Authenticating with OAuth2 for an app *and* a website

前端 未结 6 625
予麋鹿
予麋鹿 2020-12-02 04:10

I\'m developing a website that is primarily accessed via an app, and I want to use OAuth2 for user registration and authentication. Since it is an Android app I will start u

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-02 04:44

    When we had a need to do something similar on a non-google OAuth Server, we kept the tokens in a DB on the website. The app would then use web services to request the token when needed to request data.

    The user could do the OAuth registration on either the web or app. They shared the same application token, so they could share the same access token. After the registration we would store the access and refresh tokens in the DB for use from whichever app needed it.

提交回复
热议问题