Giter VIP home page Giter VIP logo

create-react-app-auth-amplify's Introduction

Create-react-app with AWS Amplify Auth (Archived)

This auth starter implements withAuthenticator HOC to provide a basic authentication flow for signing up signing in users as well as protected client side routing using AWS Amplify. Auth features: User sign up, User sign in, Multi-factor Authentication, User sign-out.

View Demo

Amplify Auth

Deploy with the AWS Amplify Console

The AWS Amplify Console provides hosting for fullstack serverless web apps. Learn more. Deploy this app to your AWS account with a single click:

amplifybutton

The Amplify Console will fork this repo in your GitHub account, and then build and deploy your backend and frontend in a single workflow. Your app will be available at https://master.appid.amplifyapp.com.

Run locally with the Amplify CLI

  1. Clone the repo that was just forked in your account
git clone [email protected]:<username>/create-react-app-auth-amplify.git

cd create-react-app-auth-amplify && npm install
  1. Import the backend environment deployed by the Amplify Console to your repo (the amplify/team-provider.json file contains information on all backend environments in your AWS account). The GIF below shows how you to copy the amplify env import command from the Amplify Console.

  1. Paste this command into your terminal at the root of your repo. You should see the amplify/team-provider.json updated with a backend named amplify.
amplify pull

img

  1. Run locally
npm start

Checkout Nader Dabit's Complete Guide to User Authentication.

create-react-app-auth-amplify's People

Contributors

abhi7cr avatar amplify-hosting-test-pdx-beta avatar athena96 avatar dependabot[bot] avatar donkahn avatar ferdingler avatar ganipcanot avatar hyandell avatar jay2113 avatar kahdojay avatar nimacks avatar nmoutschen avatar swaminator avatar

Stargazers

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

Watchers

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

create-react-app-auth-amplify's Issues

Aws - Amplify frame work interaction voice enabled not working with Lex bot

I am using aws-amplify interaction : https://aws-amplify.github.io/docs/
Interaction code is :

const customVoiceConfig = {
silenceDetectionConfig: {
time: 2000,
amplitude: 0.2
}
}
I am following this link : https://aws-amplify.github.io/docs/js/interactions

While using voice enabled interaction I am getting this error. When I press the voice button.

[enter image description here][1]Aws_restJson1_1.ts:834 Uncaught (in promise) **BadRequestException: Invalid Request: The header x-amz-content-sha256 must be set to the literal string** UNSIGNED-PAYLOAD.
    at http://localhost:3000/static/js/1.chunk.js:91237:42
    at step (http://localhost:3000/static/js/1.chunk.js:318206:17)
    at Object.next (http://localhost:3000/static/js/1.chunk.js:318137:14)
    at fulfilled (http://localhost:3000/static/js/1.chunk.js:318092:24)

  [1]: https://i.stack.imgur.com/4heUC.png

Can anyone help me to figure out this issue.

Demo application User Sign-In fails

Hey @swaminator, @dabit3,

Using the link in this repositories README.md for View demo:

When trying to create a new account, no matter what I enter in Username / Email / Password / Phone, it shows an error User does not exist in a modal at the top of the window:

image

I haven't tried deploying this to an AWS environment myself yet - I wanted to see what the experience was like before doing so.

Following resources failed - Resource Name: UserPoolClientLambda (AWS::Lambda::Function)

I just want to share the issue I faced today while deploying the demo application:

Error in Build Logs:
2021-03-18T13:29:14.017Z [INFO]: CREATE_FAILED UserPoolClientLambda AWS::Lambda::Function Thu Mar 18 2021 13:29:13 GMT+0000 (Coordinated Universal Time) The runtime parameter of nodejs8.10 is no longer supported for creating or updating AWS Lambda functions. We recommend you use the new runtime (nodejs12.x) while creating or updating functions. (Service: AWSLambdaInternal; Status Code: 400; Error Code: InvalidParameterValueException; Request ID: 88d02c8e-4646-4063-bbdc-4e1602072d2f; Proxy: null)
Solution:

  1. Go the forked repository in your github account: create-react-app-auth-amplify/amplify/backend/auth/cognitocf0c6096/cognitocf0c6096-cloudformation-template.yml
  2. Update the line 266:
    from : Runtime: nodejs8.10
    to : Runtime: nodejs10.x
  3. Commit and re-deploy. It's possible your App detects the commit, and automatically initiates the re-deployment.

PD: I didn't try using nodejs12.x or nodejs14.x, but I guess they should work, too.

Resources:
Lambda supported runtimes: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
CloudFormation runtime attribute: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html#cfn-lambda-function-runtime

How is hosting setup?

In this project we never ran amplify add hosting. However the frontend is deployed when running the CI/CD with Amplify Console.

  • Does this mean we cannot deploy this project's frontend manually?
  • Why is the hosting directory never appearing in the backend folder (As it is when deploying the hosting manually)?

amplify init not asking "Do you want to use an existing environment?"

Amplify CLI version: 4.13.1

In brief, I'm trying to provision an existing backend (react app) to a new react native app.

Following the docs here, I've performed steps 1-3 to add the env to a local project (on a different machine from where the site was initially built).

In step 3 (the second one, as there are 2 of them), its shows a prompt: Do you want to use an existing environment? Yes.

This prompt does not show. Instead, the prompts are:

? Enter a name for the project
? Enter a name for the environment
? Choose your default editor: (Use arrow keys)

Did I miss a step, have I lost the plot, or have things changed since this doc was written?

Thanks

Social SignIn needed

It would be great to extend this app to incorporate social signIn since it is the most widely used form of authentication and from looking at the forums, it appears that a LOT of people are having issues incorporating it in their apps.

Something as simple as incorporating FB, Google and Twitter seems super laborious and error prone from reading the Amplify docs, which is also super cluttered and all over the place.

Something along the lines of https://fir-ui-demo-84a6c.firebaseapp.com would be much appreciated.

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.