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

[oAuth] User profile should be updated every time they are authenticated #124

Closed
1 task
catalinmiron opened this issue Mar 24, 2016 · 2 comments
Closed
1 task
Labels
Milestone

Comments

@catalinmiron
Copy link

I have the following scenario.

Scenario: Auth, revoke and auth again 
    Given I authenticate using dribbble oauth
    And I receive the JWT among with accessToken
    And I can make a request to dribbble using that accessToken
    When I revoke the app from my account
    And login again
    Then I receive the same accessToken
    And the requests to dribbble returns "Bad credentials"
    And I cannot use the same user again within the app

This might be related to https://github.com/feathersjs/feathers-authentication/blob/fca25f2b5b03b773975595ae9ac034199df5127b/src/services/oauth2/index.js#L42-L51 because we're not doing anything if the user exists in the db.

Solution

Probably do a patch to user/ with the new accessToken? or maybe the whole profile because in the meantime, the user can also change his profile pic or name or email and we're not keeping the truth in our db.

Todo

  • add an integration test following the above scenario
@ekryski ekryski added the Bug label Mar 26, 2016
@ekryski ekryski changed the title [oAuth] Always add accessToken to the user profile [oAuth] User profile should be updated every time they are authenticated Mar 26, 2016
@ekryski ekryski modified the milestone: 0.7 Mar 26, 2016
@ekryski ekryski mentioned this issue Mar 30, 2016
17 tasks
@ekryski
Copy link
Member

ekryski commented Mar 30, 2016

Manually tested. I haven't quite figured out how to write an integration test for OAuth because you need to log in to the service and authorize the application.

@corymsmith
Copy link
Contributor

I think the only way you'd want an actual integration for this is if you set up a local OAuth server and did integration tests against that vs. an actual external service.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants