In setting up samples, I’ve made some progress with the docs, but I’ve come into this error.
Possible Unhandled Promise Rejection (id: 1):
TypeError: undefined is not an object (evaluating '_yield$getCredentials.accessToken')
I haven’t worked much with react-native. I would love to get tips on the best ways to debug in it and hear of good resources that you can recommend to
Hey there!
Can you share with us what quickstart / SDK / docs are you using so we can help you troubleshoot that? Links will be super helfpul!
Hi,
I have the same issue.
I am following this sample app:
I get the error in the onLogin function, on the “getCredentials”-line:
const onLogin = async () => {
try {
await authorize({scope: ‘openid profile email’});
const {accessToken} = await getCredentials();
Alert.alert('AccessToken: ’ + accessToken);
} catch (e) {
console.log(e);
}
};
Kind Regards,
Dime
I found the solution by myself.
I didn’t pay attention on this warning from the tutorial:
This SDK is not compatible with “Expo Go” app. It is compatible only with Custom Dev Client and EAS builds.
I am using indeed the Expo Go-App. So I switched to Custom Dev Client and EAS builds, and this was the solution. The step-by-step how to do this is here:
1 Like
Thanks for sharing it with the rest of community!
system
Closed
December 19, 2022, 8:29am
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.