saving access token of social provider
# support-questions
k
@rp Hi , I was going through the documentation for getting the third party providers access token. Right now only when I login , I am getting the access token. But what if I need the access token later? How will be able to do that? override : { apis: (originalImplementation) => { return { ...originalImplementation, signInUpPOST: async function (input) { if (originalImplementation.signInUpPOST === undefined) { throw Error("Should never come here"); } let response = await originalImplementation.signInUpPOST(input) if (response.status === "OK") { let accessToken = response.authCodeResponse.access_token console.log(response) } return response; }, } } } https://supertokens.com/docs/thirdparty/post-login/getting-provider-access-token
r
hey @Kevinkevinkevin you could save it in the session's access token payload, or in the user metadata recipe, or in your own database.
k
Thanks @rp I implemented saving to database. I just wanted to know , if there were anything I missed.
r
right. Yea, at the moment, no other way.