Open HassanHaiderIX opened 3 years ago
+1 would be interested on the best practice to refresh expired tokens
Can call ReactNativeADB2C.js->assureToken() to refresh the token and return the new bearer token if expired. If you want to store tokens some where then can do the same in refreshToken (), some thing like this
this.grantAccessToken(grantType, config)
.then((resp) => {
//store the resp.response in async storage.
resolve(resp.response.access_token);
})
.catch((err) => {
reject(err);
});
});
This is not a library, feel free to fork and modify the way you all wanted.
I am having trouble to get refresh token. Once I get the token I stored it in async storage. I am not sure what steps do I have to follow to get refresh token successfully. Apparently there was an issue that was related but closed. https://github.com/sonyarouje/react-native-ad-b2c/issues/5