https://github.com/secretshardul/amplifytodo
AWS amplify RN tutorial
https://github.com/secretshardul/amplifytodo
Last synced: over 1 year ago
JSON representation
AWS amplify RN tutorial
- Host: GitHub
- URL: https://github.com/secretshardul/amplifytodo
- Owner: secretshardul
- Created: 2020-05-25T05:39:11.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T06:54:57.000Z (over 3 years ago)
- Last Synced: 2025-01-19T07:24:47.649Z (over 1 year ago)
- Language: Java
- Size: 2.11 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Social sign in setup
1. Generate OAuth2.0 credentials from google console.
2. Enable linking in react native. Here we set app URI as ```myapp://``` by making the below changes
**Android**: ```android-manifest.xml```
```xml
```
**iOS**: ```config.plist```
```xml
CFBundleURLSchemes
myapp
```
3. Setup new cognito user pool with social auth using amplify. Set signin and signout URIs as ```myapp://```. Note the **hosted UI endpoint** displayed in CLI. This is the user pool URL which will be called by Google Oauth service.
4. Setup [Google social login](https://developers.google.com/identity/sign-in/web/sign-in) using the user pool URL.
5. Visit Google developer console. Open the old Oauth client created in first step(not the one created in step 4).
```
Authorized JavaScript origins: https:// {
return (
My app
{
// Auth.federatedSignIn(); // Hosted web UI by Cognito for all login options
Auth.federatedSignIn({provider: 'Google'}); // Google login
}}
/>
);
};
```
# Caveats
1. Cognito login is web based and not native. Users are redirected to browser. Integrate native SDKs with cognito in future.