Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can I use the front-end components from this repo to implement usernameless sign-in with the new native Cognito passkey support as a backend?? #227

Open
crismerritt opened this issue Jan 28, 2025 · 1 comment

Comments

@crismerritt
Copy link

crismerritt commented Jan 28, 2025

I want to implement usernameless sign-in for our app, which uses Cognito. I have enabled the native passkey support in our Cognito user-pool. However, as we know, Cognito's new Managed Login UI does not support usernameless sign-in.

I would prefer not to deploy a bunch of new backend infra, so I am wondering if I can use the front-end components from this repo with the native passkey support from Cognito to achieve my goal.

I can certainly give it a try as an experiment to answer my question, but I would be grateful if anyone can save me a little time if I'm barking up the wrong tree.

Thank you.

Cris

@ottokruse
Copy link
Contributor

ottokruse commented Jan 29, 2025

What the solution here does, for usernameless sign-in, is to create a random challenge and store it in DynamoDB, and return it to the frontend, so that the frontend can do the WebAutnn getCredential, and then send the signature to Cognito, where a custom auth lambda function checks that the challenge you used in the frontend matches what is in the DynamoDB table. (Reason: the challenge must not be under threat actor control otherwise you can eg do replay of an old signature)

See sequence diagram: https://github.com/aws-samples/amazon-cognito-passwordless-auth/blob/main/FIDO2.md

Don't see how that can possibly work with the new native Cognito solution, but I haven't looked very closely it at yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants