-
Notifications
You must be signed in to change notification settings - Fork 4k
feat(adapters): allow Account mapping before DB
#5461
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
|
cc @palminha curious what you think. This would still introduce a new config option but would be already familiar since it's similar to the We could change the default value to It would align with the |
| if (version?.startsWith("1")) { | ||
| return { | ||
| ...required, | ||
| oauth_token_secret: rest.oauth_token_secret, | ||
| oauth_token: rest.oauth_token, | ||
| } | ||
| } | ||
| return { | ||
| ...required, | ||
| access_token: rest.access_token, | ||
| token_type: rest.token_type, | ||
| id_token: rest.id_token, | ||
| refresh_token: rest.refresh_token, | ||
| scope: rest.scope, | ||
| expires_at: rest.expires_at, | ||
| session_state: rest.session_state, | ||
| } |
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.
These are the values currently in the default schemas.
19c6807 to
3be7bb7
Compare
|
Closing as discussed with @ThangHuuVu. With some minor changes, this will be part of |
This is an alternative proposal to #4893
Right now, we pass through all the values of a provider account to the DB, and it causes confusion/unforeseen breaks when a provider decides to return a new property.
To solve this, we can add an
accountproperty to the provider configuration, similar to theprofilecallback, to control what part of the account should be saved to the database.Example:
Closes #4893