requests-oauthlib icon indicating copy to clipboard operation
requests-oauthlib copied to clipboard

Question regarding refresh tokens documentation

Open bhargavrpatel opened this issue 7 years ago • 1 comments

Hello,

In the Refreshing tokens in OAuth2 document, the example stores the fetched token into the session, as shown below.

# We use the session as a simple DB for this example.
session['oauth_token'] = token

In a real application, this would be stores in some sort of a database. However, my question is this: How would you relate that token to a particular user that is not signed in?

Our problem is that we have a separate frontend and the API and every time a user visits the website, we do not really know who they are until they login. So, even if we store the token, we cannot really link it. So in our case, is it that we cannot use Refresh tokens at all? Is there anything identifiable in the authorization_response?

Regards,

bhargavrpatel avatar Sep 27 '17 02:09 bhargavrpatel

@bhargavrpatel Have you found any solution to this? Could you let me know what you did with it? I too would be doing this and your question got me thinking. Thanks.

icanthinkformyself avatar Aug 22 '18 03:08 icanthinkformyself