@rp_st 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
rp_st
05/26/2023, 3:56 PM
hey @kevin_kevin_kevin_kevin you could save it in the session's access token payload, or in the user metadata recipe, or in your own database.
k
kevin_kevin_kevin_kevin
05/26/2023, 3:57 PM
Thanks @rp_st I implemented saving to database. I just wanted to know , if there were anything I missed.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).