Feathers Client reAuthenticate should check window.location before localstorage for OAuth logins #2749
nathanbrizzee
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In my testing of changing OAuth provider logins, I've run into the following scenario. If I sign in with Microsoft as an OAuth provider, then sign in with Google as an OAuth provider, I end up getting back the user object for the Microsoft account, not the Google account. The reason for this is because local storage is checked before window.location and since I have a token from the previous OAuth login in localstorage, even though I successfully authenticated with Google, it signs me in with the Microsoft token. The reason why is because of this line:
feathers/packages/authentication-client/src/core.ts
Line 146 in 21d6aaa
I propose this line be changed to something like the following to ensure OAuth tokens take priority over localstorage tokens:
Beta Was this translation helpful? Give feedback.
All reactions