Is there a way to programmatically switch accounts on metamask using web3? - metamask

I'm trying to add a utility to my dApp where the user doesn't need to access their metamask extension to switch accounts. Is it possible to integrate this?
For example, I would like my user to click on a button and it shall call a method, say switchAccount(address) and it will switch the account to this particular address I just mentioned.
As far as I have researched, this isn't possible "yet". But I just want to make sure this is correct.

Related

allow user to customize settings in installed slack app

I'm developing a slack app, and I'd like to allow the users who uses my app to customize specific settings, e.g. 3rd-party integration passwords.
How can this be done?
If you app needs to manage custom user settings you need to build that yourself.
UI to show and modify settings
Storage to store settings
You can use any approach for that, e.g. build the UI part within Slack (a Slack Dialog would work nicely) or make an external website.
You need to store state of the user settings someplace. I agree with Erik that you can build the UX within slack.
I don't think Slack has a great way to do store state right now, though I suppose you could create some hacky way of doing it (create a private slack channel for each user with a random name and store state in there).
I'd suggest using either a real database, or a service like Transposit (full disclosure, I work there). With the former, you could use something like Heroku Postgres, and host an API on Heroku. With the latter, you could use the Slack API combined with Dynamodb or some other database.

How does Google One-Tap manage my refresh tokens? How does it differ from GAPI?

In the documents of Google One-Tap sign in, it says:
Returning users are signed in automatically, even when they switch devices or platforms, or after their session expires.
Question 1:
But it doesn't say anywhere how it does this? Is the user refresh token saved in the browser's cache? How can it then auto log in a user cross devices?
Question 2: The reason I ask is because I have a setup where I initialize the Google API client for JavaScript ("GAPI"). The GAPI library also automatically logs in a user whenever the client is "initialised" through gapi.client.init().
Now the problem is that after I have added the Google One-Tap code (Or should I say "YOLO code"? : ) my user gets logged in through One-Tap and also through GAPI. I can prevent this by not initializing the GAPI client, but I don't think that's wise, because I thought this whole library is built to manage my refresh tokens etc. Is my understanding correct that One-Tap does exactly the same and in case I only want to Authenticate users I do not need the GAPI client anymore?
Really, which library does a better job at managing my refresh tokens? And how do they differ? I'm clueless...
The way I implemented my login is the following:
Try to login in the user first using gapi.auth2. Maybe the user was previously signed into the site.
If can't login user automatically, then use googleyolo to try to find existing user accounts.
If no existing accounts, then present a signin button for user to signin.
I can give you some code snippet if you need.
To answer your questions.
#1, the credential is stored within the browser/device. If the user has never signed into google in a device, then yolo won't be able to sign in the user.
#2. googleyolo will also login the user, the difference is that it will give the account selector even if there's only one user to select (it will automatically login the user if there's only one). gapi simply sign in the user without showing anything.

Mixpanel not able to identify users using "alias" or "identify"

I an developing a chrome extension which doesn't has any sign up or sign in flow, instead depends on authentication of a separate web app. I started integrating mixpanel and tracking user events anonymously, Now i want to identify those anonymous users using "alias" and "identify" api. I have a user_id for identifying users from the web app exposed REST api. Now if i apply a boolean check and make sure i call mixpanel "alias(user_id)" once and call "identify(user_id)" every time user visits a page, I can see a user entry in explore tab of mixpanel but live events tab has a anonymous user with same user_id and its tracked data, I wish to link such anonymous users with appropriate user profiles.
Please help me with this if you have some understanding of mixpanel. I am new at this.
Since I didn't had a sign in or sign up flow, I cannot use
mixpanel.alias
Hence i am now calling
mixpanel.identify
As soon as user installs the plugin, Since "identify" api can be called any number of times for an user, We are able to track all future events as soon as plugin gets installed.
This way by not letting the user generate anonymous events we can handle such situation.

Using AdsOpenObject lock user

We have developed a web program for one of our customers, where we use the company’s AD to validate the user. We use function AdsOpenObject('WinNT://... and this work fine, whoever one fail use of wrong password, and the user is disabled, and need to be reactivated. The AD is set up to use 5 fail login before disabling, and their mail system is working accordingly.
Any ide where to look for or any idea of using another method to validate a user against an AD. We use Delphi but other solution is welcome.

Is it possible to create a program that changes/customizes how a user logs into their account in Windows?

Hello Stackoverflow Community,
I was wondering if it would be possible to change the way a user logs in using Windows. I currently have Windows 8.
What I mean by this question is that instead of a user entering a password to log into their account or using a finger print scanner, we can have something like a matrix of numbers (like the movie) that keeps scrolling up or down. A user has to click in a certain way or combination. Or the user has to drag certain numbers over others in different columns (some sort of idea along those lines using some sort of algorithm).
Is it even possible to change the way a user logs into their account on Windows? I do have an old laptop I can mess around with.
Thank you.
Windows has 3 built-in Sign-in Options
Login using a Password
Login using a Picture Password (you login using three gestures saved on a picture)
Login using a 4 Digit PIN
Apart from this you can get rid of Windows Sign-in option by running 'netplwiz' in run box and unchecking the box that says “Users must enter a user name and password to use this computer”.
You can then use software like Eusing Maze Lock
XUS PC Lock
Also using fingerprints is possible if you have a fingerprint reader. Check if 'Biometrics\Credential Provider' registry entry for this is disabled if you are unable to get a fingerprint option in Sign-in options.

Resources