adsabs / adsws

ADS web services
Other
2 stars 15 forks source link

Problems and optimisations of bootstrap #81

Closed jonnybazookatone closed 8 years ago

jonnybazookatone commented 8 years ago

There are a few issues with the bootstrapping at the moment:

  1. current_user.id() returns string, and .client_id returns an int. This line is never checked, so bootstrap is serving tokens for the same session cookie, continuously.
  2. oauth_client is not removed from the session when someone logs out. This shouldn't be left dangling
  3. Everytime bootstrap is accessed, the oauth_client is checked even if there is no oauth_client in the session. This means there is database access everytime - this is not needed.

I have fixes in place, this ticket is purely for reference. See relevant PR when it is opened.

jonnybazookatone commented 8 years ago

And

  1. updates to flask-login should be modified (although they may be fixed in RCs last PR)