Log in to a Chrome app or extension

前端 未结 1 1958
我寻月下人不归
我寻月下人不归 2021-01-15 06:55

How would I go about creating an auth system requiring a user to log in to a Chrome app or extension via my own service?

A good example is the TweetDeck app, where t

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-15 07:11

    Use the Chrome Identity API to authenticate users: the getAuthToken for users logged into their Google Account and the launchWebAuthFlow for users logged into a non-Google account. If your app uses its own server to authenticate users, you will need to use the latter.

    from https://developer.chrome.com/apps/app_identity.

    Here's an example of an app that implements the Identity API: https://github.com/GoogleChrome/chrome-app-samples/blob/master/github-auth/index.js

    0 讨论(0)
提交回复
热议问题