尝试登录我的应用程序时,出现此错误:
AuthError: Unauthorized
at responseHandler (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:138123:11)
at tryCallOne (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:3046:14)
at blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:3147:17
at blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:24234:21
at _callTimer (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:24123:9)
at _callImmediatesPass (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:24159:9)
at Object.callImmediates (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:24378:14)
at MessageQueue.__callImmediates (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:2441:16)
at blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:2278:18
at MessageQueue.__guard (blob:http://localhost:8081/206518ee-d12d-4465-8558-01458f681f1f:2424:13)
这是调用auth0的代码,由TouchableOpacity调用,后来我尝试了一下,它起作用了,登录类型为Google-Auth:
onPressCallback = () => {
auth0
.webAuth
.authorize({scope: 'openid profile email', audience: '*******************'})
.then(credentials => {
console.log(credentials);
this.props.setSession(credentials);
this.props.navigation.navigate('Home');
})
.catch(error => console.log(error));
}