Cotter's SDK automatically stores the returned access_token, id_token , refresh_token and user information in the device's secure storage when the user successfully authenticates.
Get Access Token
This function automatically refreshes the access token when needed.
1
constgetAccessToken=async()=>{
2
var cotter =newCotter(API_KEY_ID);
3
try{
4
var accessToken =await cotter.tokenHandler.getAccessToken();