To answer your questions,
- Is the above process a good practice?
Yes, this is really good practice, why are you asking ?. You do not store the Id / Secret client at the end of the mobile connection, and you simply redirect to the site of the social authentication provider Oauth, and data is exchanged between the server and the server, which is also considered safe.
As for the third-party access token, if you do not want to later access the resources for the social provider, you do not need to store any of their access tokens, i.e. after authentication, you can safely refuse your access token and create your own
For the second question
You do not need to worry about this, that is, as soon as the user logs out, you just need to cancel the accessToken you issued.
As for the Oauth process, you just need to redirect to oauth Flow for the social provider (and not worry about whether the user is logged in or not), the social provider will take care of this, you will receive an authorization code in the end, you just need to process it , like the first time.
Hope this answers your questions!
Ramesh Lingappa May 30 '16 at 8:13 2016-05-30 08:13
source share