-
Notifications
You must be signed in to change notification settings - Fork 451
How to implement login with OTP functionality using aws cognito JS SDK? #625
Comments
There is an example in Tim Hunt's re:invent presentation of how to do this using the custom authentication flow (he is the last presenter): |
Hi @itrestian I understood it but sample app/doc will make me bit more clear. Can you please provide that? |
@itrestian I tried custom auth flow.But getting error: Incorrect username or password. My code is below.
May be this error because of password, But It should not expect the pass word in passwordless authentication flow. |
Actually you would have to call initiateAuth such as in use case 25 in the readme. The authenticateUser call is used for SRP. |
I tried that but I am getting error like "Property 'initiateAuth' does not exist on type 'CognitoUser'. @itrestian |
You're probably using an older version of this? |
I am using 1.28.0 version. |
My lambda functions. DefineAuth:
VerifyAuth: |
If you are using the typescript typings, I guess the definition for initiateAuth might not be there yet. |
What does it mean? I am using angular4 with Typescript |
`declare module "amazon-cognito-identity-js" {
} |
I added some thing like below in index.d.ts file. Now my error is Unreconizable lambda output. What is happening here? |
@itrestian kindly let me the exact issue here. |
Not entirely sure, the lambdas look ok to me. You can check the lambda console to debug lambda failures and see lambda inputs and outputs. |
@itrestian Is any example available for this flow? |
The video I mentioned should have the example you need. |
Yes. |
@itrestian Can you please provide any example achieve custom authentication flow? |
any updates on updated typings? there are a few methods missing |
As part of my requirements,I crated sample app which confirms both Email and Password and using MFA too. Now, I want to build functionality like login with OTP.
Can somebody give a basic idea how can I implement this?
(I am developing this app Angular 4 and please note that my Email/phone attributes are already verified!!!)
The text was updated successfully, but these errors were encountered: