fat*_*oud 5 google-authentication react-native expo
我创建了客户端 id 来在 expo 应用程序中测试它,该应用程序的 api 是用 Nodejs 编写的,如下步骤
Application Type: Android Application
Package name: match with the value of android.package in app.json.
Authorized JavaScript origins
URIs:http://localhost:3000
Authorized redirect URIs
http://localhost:3000/googleLogin
Run Code Online (Sandbox Code Playgroud)
并在我的代码中使用它
import * as Google from 'expo-google-app-auth';
export default function Signup() {
const googleSignin = async() => {
let result = await Google.logInAsync({
androidClientId: `${CLIENT_ID}`
});
console.log(result)
}
return (
<TouchableOpacity onPress={()=>googleSignin()}>
<Text>LOG IN WITH GOOGLE</Text>
</TouchableOpacity >
)
}
Run Code Online (Sandbox Code Playgroud)
我收到该错误 >> 授权错误错误 400:“WEB”客户端类型不允许 invalid_request 自定义方案 URI
| 归档时间: |
|
| 查看次数: |
452 次 |
| 最近记录: |