我有一个 expo react 本机应用程序,它使用 Expo AuthSession.startAsync 使用外部提供程序登录。
突然之间,它在获得访问令牌后停止重定向回应用程序,我不知道为什么,据我所知,一年多来没有任何变化,所以我对发生的事情完全感到困惑.
这是代码......基本上不会返回结果,它只是重定向到模式上查询字符串中带有#access_token的页面,但之后没有任何反应?
const result = await AuthSession.startAsync({
authUrl: url
});
if (result.type === "cancel") {
// do nothing
} else if (result.type !== "success") {
Alert.alert("Error", "There was an error logging in to the external provider, please try again.");
} else {
const accessToken = result.params.access_token;
console.log(accessToken);
this.props.setAccountJwt(accessToken);
navigate("Levels");
}
互换的青春
相关分类