Giter Site home page Giter Site logo

amplify-passwordless-sms-auth's Introduction

Amplify Passwordless SMS Authentication

This is your passwordless SMS authentication solution for AWS. It uses Amazon Cognito user pools custom auth challenge with AWS Lambda triggers as shown in this diagram.

Lambda Triggers Diagram

This repo provides:

  1. The backend source configuration to deploy a fully functional passwordless SMS backend solution via this AWS Serverless Repository.
  2. A sample Web Client (Angular) app that demonstrates sign-up and sign-in of users via their phone number. The web client is an Angular 7 app that connects to your backend that was deployed via the AWS serverless repository.
  3. A sample iOS Mobile Client that demonstrates the ability to sign-up and sign-in a user via their phone number, straight from a native mobile app.

If you are interested in passwordless email authentication

Backend Deployment instructions

Deploy the backend through the Serverless Application Repository as outlined in /backend.

Once you deploy this backend via the Serverless Application Repository, you can setup the provided web client (Angular) or iOS app to demonstrate sign-up and sign-in of users, using only their phone number.

Clients

Web Client (Angular)

iOS Client

License Summary

This sample code is made available under a modified MIT license. See the LICENSE file.

amplify-passwordless-sms-auth's People

Contributors

dependabot[bot] avatar mobilequickie 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

amplify-passwordless-sms-auth's Issues

Creation fails because of nodejs12.x deprecated

I am mostly a beginner so if I am doing anything wrong or have not provided enough information so please ask. This is important for my job and I am already beyond deadline so any help and insight will be greatly appreciated.

I am trying to deploy this(https://serverlessrepo.aws.amazon.com/applications/arn:aws:serverlessrepo:us-east-1:552623489034:applications~amplify-passwordless-sms-auth) stack in the ap-southeast-1 region. I change the region after clicking on the given link from the console's top right.

Then after giving a name and deploying, I get the same issue again and again (tried twice).

As I have attached in the screenshot, this function creation is the first to fail in the stack. After that the entire stack is rolledback. Please guide as to how to move forward.

Screenshot from 2023-06-08 12-08-22

How to implement using android amplify library

I have tried this code using the web version, after tinkering with the sns settings got it working fine.
To implement the client in android app I changed default config to CUSTOM_AUTH, that passed first singin call. But now stuck at second stage where the response to the challenge needs to be submitted.
What is the substitute for following js api call in android amplify library?.
Auth.sendCustomChallengeAnswer(user, OTP);
I couldn't find any equivalent. confirmSignIn is for mfa so not useful here.
Is there any quick alternative to have that specific api call? As I am using Retrofit lib, any guide to use it to achieve this?

How to handle new signup?

Huge thanks for providing this.

Looking at the iOS code I see that new signups are not handled on the iOS client. Is this a limitation of the backend as well?

I'd be eternally grateful if you could provide some pointers on how to implement signup. I'd be happy to contribute my code back.

How to resend the confirmation code?

Hello,

After calling:
AWSMobileClient.default().signUp and AWSMobileClient.default().signIn
we have to call AWSMobileClient.default().confirmSignIn(challengeResponse: code) with the correct code in order to complete the sign in.

What about if we don't receive the message? How can we retry that?

If I call
AWSMobileClient.default().resendSignUpCode(username: "-my phone number-",
I receive:

▿ AWSMobileClientError
  ▿ notAuthorized : 1 element
    - message : "Cannot resend codes. Auto verification not turned on."

Any recommendation?

Thanks a lot.

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.