Skip to content

baotran2207/kyco

Repository files navigation

Updating

I.Introduction:

This project is my sample serverless application using AWS with lambda functions (chalice based), cognito and storage services . One exeption is RMDB database ,due to aurora is not really serverless (and not free :v) , i use supabase for

II. Project components

III. Development

IV. Usages

  1. Install httpie for http request (it is more human friendly than curl):

pip install httpie

  1. Replace tranthanhbao_tester@gmail.com with your test email

A. Auth

  • Register without/with password:

a. Without password

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/login email=tranthanhbao_tester@gmail.com

b. With password

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/login email=tranthanhbao_tester@gmail.com password=Abc123!@#

B. Verify email

  • Verify email:

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/verify_email email=tranthanhbao_tester@gmail.com confirmation_code=282484

  • Resend confirmation code:

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/resend_confirmation email=tranthanhbao_tester@gmail.com

C. Login

Note:

  • email must be verified before login (cognito requirement)
  • Reponse: tokens

a.Login withn password:

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/login email=tranthanhbao_tester@gmail.com password=Abc123!@#

b.Login without password (via otp code)

  • Request otp

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/init_challenge email=tranthanhbao_tester@gmail.com

  • Login with otp (otp code received from email and session_id = response from api init_challenge):

http POST https://zr0fxh86b0.execute-api.ap-southeast-1.amazonaws.com/api/auth/login_with_challenge email=tranthanhbao_tester@gmail.com challenge_answer=<otp_via_email> challenge_session_id=<response from init_challenge>

login_with_otp.md.png

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published