Replies: 1 comment
-
I'm all in favor! As a first step, let's add this as |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Goals
Non-Goals
Background
Currently, when signing in using a provider, we're populating the Account with refresh and access tokens. These are left static for the entire lifetime of the Account, which I think shouldn't be the case as that will turn at some point on revoked access if the user clicks “sign me out of all my devices” on their provider account, their admin triggers a password loss procedure or if we change the scopes we request on our token.
Proposal
I suggest a new adapter function called updateAccount() (on prisma adapter only as a PoC) which takes an Account and a UserID as props. This function will search for that account on the database and update it with the updated account information on login. In case that Account does not exist, it will create a new entry, which means this function could potentially be used as well for linking an account as well.
The function is optional to make sure no other adapters are being broken after merging.
See this pull request as reference
Beta Was this translation helpful? Give feedback.
All reactions