-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oauth unlink social accounts #253
Oauth unlink social accounts #253
Conversation
7f6cee1
to
ab77e1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I'm sorry for the delay in reviewing.
…ic GET oauth/info endpoint, and private DELETE /account/{id}/oauth endpoint
…count from an user that does not exists.
ea18267
to
bbce75d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good think this is my last round of comments.
@@ -0,0 +1,62 @@ | |||
package services_test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename file
@cainlevy do you think we need to worry about revoking the stored access token here or is it sufficient to "forget"? Looking at apple's implementation it would be fairly simple, though it does require an additional URL to be defined https://developer.apple.com/documentation/sign_in_with_apple/revoke_tokens/ A quick search on google and microsoft seems to indicate the tokens expire after an hour anyway so may be nothing to worry about there. |
3c081af
to
e20e128
Compare
e20e128
to
5277772
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you! it's looking good.
Personally I would expect it's enough to forget them. Revoking them sounds very thorough but also would require a higher level of integration with each identity provider. |
Where the discussion started. Authn issue.
Summary
This PR is adding the ability of share oauth account information and delete them.
Changes
email
column tooauth_accounts
table in order to facilitate users identify their accounts.GET /account/{id}
to returnoauth_providers
containing OAuth information.DELETE /oauth/{provider}
allowing user unlink OAuth accounts.GET /oauth/info
returning oauth information for linked accounts.DELETE /account/{id}/oauth
allowing unlink OAuth accounts for the given user.There's a particular use case that requires special attention. When a user registers via the OAuth flow, a random password is generated. To unlink the social account, Authn verifies whether the user needs to set a new password. As a side effect, a new error, NEW_PASSWORD_REQUIRED, has been introduced.