aws-samples / amazon-cognito-passwordless-auth

Passwordless authentication with Amazon Cognito: FIDO2 (WebAuthn, support for Passkeys), Magic Link, SMS OTP Step Up
Apache License 2.0
337 stars 61 forks source link

[Question] Using Fido2 credentials for non-signin challenges #164

Open SlootSantos opened 2 months ago

SlootSantos commented 2 months ago

Hey folks,

first I have to repeat myself: What a fantastic piece of work you're delivering here. This is greatly simplifying the adoption of safer authentication methods!

Now, I have a more conceptual question: Let's imagine the use case where an admin user is trying to take some destructive action through an application's UI. The application owners want to secure this destructive action with an additional challenge, i.e., "Confirm with your password." With our FIDO flow, we don't have a password, but rather, we have the custom challenge through Cognito.

How would one handle this? Would we re-initiate the authentication flow? Or would we need another API for that?

Thank you!

ottokruse commented 2 months ago

Sorry for the late reply. You could use a step up auth flow, with webauthn for this case. An expample of this, is in the end to end example of this repo.

You'd have to make destructive actions two legged as per the step up auth docs in this repo.

If you have already implemented something else yourself, please share your solution