Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

reauth: check for updated oauth tokens, update if necessary #37

Merged
merged 7 commits into from
Jul 10, 2014

Conversation

eriktaubeneck
Copy link
Collaborator

Added test for coverage for this change. Test passes for SQLAlchemy app, but not for MongoDB or Peewee apps. The after_this_request(_commit) doesn't seem to take for those two, and I'm not sure exactly how to add the updated connection object to the abstracted "session" (or if that even makes sense in this abstraction).

@eriktaubeneck
Copy link
Collaborator Author

Also, need to update the other providers before this is merged in, but wanted to get feedback first.

@eriktaubeneck
Copy link
Collaborator Author

Also 2, plan to add a /reauth (or equivalent) route, which would log the user out, then log them back in through the account that needs reauting, resulting in a reauth, unless anyone sees a cleaner way to do that.

@eriktaubeneck
Copy link
Collaborator Author

I've added the get_token_pair_from_response method to all providers, added the /reconnect/<provider_id> route, and written a test to cover the new route. The mongo and peewee tests are still failing, (now on both tests).

@eriktaubeneck
Copy link
Collaborator Author

Doh. I needed to add _datastore.put(connection) after it was updated. I'm actually confused as to why the SQLAlchemyDatastore tests passed without that, particularly because I just tested it in the wild and it didn't work. WIth that change, all tests are passing. Testing in the wild currently.

@eriktaubeneck eriktaubeneck mentioned this pull request Feb 19, 2014
5 tasks
@jaitaiwan
Copy link

@eriktaubeneck Anything you need help with on?

@eriktaubeneck eriktaubeneck merged commit 37b40cb into develop Jul 10, 2014
@eriktaubeneck eriktaubeneck deleted the reauth branch July 10, 2014 18:45
@jaitaiwan jaitaiwan mentioned this pull request Jul 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants