How do i get the oauth token and save it to the additional fields

is there a way to accomplish something like this ?
socialProviders: {
github: {
clientId: envVariables.GITHUB_CLIENT_ID,
clientSecret: envVariables.GITHUB_CLIENT_SECRET,
mapProfileToUser(profile) {
return {
// githubAccessToken: profile.,
lastName: profile.name.split(" ")[1],
};
},
},
},
socialProviders: {
github: {
clientId: envVariables.GITHUB_CLIENT_ID,
clientSecret: envVariables.GITHUB_CLIENT_SECRET,
mapProfileToUser(profile) {
return {
// githubAccessToken: profile.,
lastName: profile.name.split(" ")[1],
};
},
},
},
2 Replies
bekacru
bekacru3mo ago
The token is already store in the accounts table. But might be a good idea to pass the tokens to the profile callback. Feel free to open github issue.
tigawana
tigawanaOP3mo ago
Ohh i see it in the accounts table, yes it would be convenient to have it in the user session payload

Did you find this page helpful?