Я пытаюсь реализовать аутентификацию Google в собственном приложении React, используя AWS Усиление. Я установил Amplify в своем приложении, а также установил Auth.
У меня есть этот клиент в Google apis: 
Авторизован javascript origin:
https://inventory053721f5-053721f5-develop.auth.eu-west-1.amazoncognito.com
URI авторизованного перенаправления:
https://inventory053721f5-053721f5-develop.auth.eu-west-1.amazoncognito.com/oauth2/idpresponse
aws -экспорт. js:
// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = {
"aws_project_region": "eu-west-1",
"aws_cognito_identity_pool_id": "***",
"aws_cognito_region": "eu-west-1",
"aws_user_pools_id": "***",
"aws_user_pools_web_client_id": "***",
"oauth": {
"domain": "***",
"scope": [
"phone",
"email",
"openid",
"profile",
"aws.cognito.signin.user.admin"
],
"redirectSignIn": "inventory://",
"redirectSignOut": "inventory://",
"responseType": "code"
},
"federationTarget": "COGNITO_USER_POOLS"
};
export default awsmobile;
Мой App.tsx
выглядит так:
import React, {FunctionComponent} from 'react';
import Amplify, {Auth} from 'aws-amplify';
import {Button} from 'react-native';
import config from '../../aws-exports';
Amplify.configure(config);
export interface AppProps {}
const App: FunctionComponent<AppProps> = () => {
return <Button title={'Login'} onPress={() => Auth.federatedSignIn()} />;
};
export default App;
Видео о том, что происходит:
https://imgur.com/tPEcoop