Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you access native login features through Desktop Google Chrome, like Instagram?

Chrome Login I am trying to figure out how to access the chrome browser's native login functionality. If you look at the picture above, you'll see that drop down "Sign in as...". That is not apart of the JS/HTML inside the window, that is native browser functionality.

I researched Google's Identity Platform but have not seen how this specific implementation was done. These identities are owned by Instagram, they are not google accounts.

I've love to figure out how I can copy this behavior for my own web apps. I am also hoping this isn't a proprietary deal between Instagram and Chrome.

like image 664
mclenithan Avatar asked Jan 25 '19 01:01

mclenithan


Video Answer


1 Answers

It's Navigator.credentials API. Open console in Instagram and paste

navigator.credentials.get({
     password: true,
     federated: {
       providers: [
         'https://accounts.google.com'
       ]
     }
   })

you will see the same native dialog.

like image 59
ku- Avatar answered Sep 28 '22 01:09

ku-