如何通过桌面谷歌浏览器访问本机登录功能,如Instagram? [英] How do you access native login features through Desktop Google Chrome, like Instagram?

查看:311
本文介绍了如何通过桌面谷歌浏览器访问本机登录功能,如Instagram?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我正在尝试弄清楚如何访问Chrome浏览器的本机登录功能。如果您查看上面的图片,您会看到登录为...。这不是窗口内JS / HTML的区别,也就是原生浏览器功能。

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.

我研究了谷歌的身份平台,但还没有看到这个具体实现是如何完成的。这些身份归Instagram所有,它们不是Google帐户。

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.

我很想知道如何为我自己的网络应用程序复制此行为。我也希望这不是Instagram和Chrome之间的专有协议。

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.

推荐答案

这是 Navigator.credentials API。
在Instagram中打开控制台并粘贴

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.

这篇关于如何通过桌面谷歌浏览器访问本机登录功能,如Instagram?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆