An open API service indexing awesome lists of open source software.

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

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.