Git Product home page Git Product logo

react-native-amplify-cognito-example's Introduction

React-Native Amplify Cognito Login Example App

Feature

Due to aws-amplify is not support user pool & hosted UI with react-native in current time, so I made this PoC to login with amplify & identity pool (federated login) via Google & Facebook social login.

Anyway, I am looking forward to the way that we can login with cognito user-pool & react-native supported hosted-ui (Native-based).

Instruction

  1. Please refer the AWS Amplify official documentation to set your AWS Mobile Hub & Cognito.

  2. Set your Facebook App & Google App (OAuth 2.0 Client ID).

  3. Replaced android/app/google-services.json with you Firebase app. (If you want to login with google)

  4. Make sure that you have set the aws-exports.js in src/, like:

    const awsmobile = {
     'aws_auth_facebook': 'enable',
     'aws_cognito_identity_pool_id': 'us-west-2:xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx',
     'aws_cognito_region': 'us-west-x',
     'aws_facebook_app_id': 'xxxxxxxxxxxxxxxxx',
     'aws_facebook_app_permissions': 'public_profile',
     'aws_google_app_permissions': 'email,profile,openid',
     'aws_google_web_app_id': 'xxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com',
     'aws_project_id': 'xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx',
     'aws_project_name': 'react-native-amplify-cognito-example-xxxxxxxxxx',
     'aws_project_region': 'us-west-x',
     'aws_resource_name_prefix': 'reactnativeamplifyco-mobilehub-xxxxxxxx',
     'aws_sign_in_enabled': 'enable',
    }
    
    export default awsmobile;
  5. Run react-native run-android or react-native run-ios

Packages

License

MIT License

react-native-amplify-cognito-example's People

Contributors

patw0929 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-amplify-cognito-example's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.