flask-oauth icon indicating copy to clipboard operation
flask-oauth copied to clipboard

oauth session variables must be explicitly cleared before making authorize request

Open lucasvickers opened this issue 12 years ago • 0 comments

In a situation where a user has oauth tokens in their session variables, but makes a oauth.authorize request, the oauth request appears to get signed by the existing keys.

I noticed this explicitly for twitter where additional oauth authorize requests would fail unless I did

del session['twitter_oauth_tokens']

Upon writing this I acknowledge that it sounds weird to send in an oauth authorize request if the user already has this info in their session, but in my case the flask oauth may expire and the user is logging back in through twitter.

I am curious if there is a reason you don't automatically ignore oauth tokens on oauth.authorize requests?

lucasvickers avatar Jul 02 '13 16:07 lucasvickers