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
367 stars 63 forks source link

Amplify cli end-to-end example #163

Closed juanf9224 closed 5 months ago

juanf9224 commented 5 months ago

Hi, Thanks for bringing this gem to the world!

I tried to replicate the steps on the end to end example but with amplify but no luck (I'll keep trying!) but it would be great if there could be an end to end example using amplify cli.

first error was due to not having esbuild as a dependency and then after installing it got another error but this time from the esbuild execution.

So if this is something that will happen, I would truly appreciate it!.

ottokruse commented 5 months ago

Thanks for registering the interest!

Please update here should you get it working (I think it should but we haven't explicitly tested with Amplify CLI so I'm also not surprised there's gotchas)

juanf9224 commented 5 months ago

@ottokruse For sure!

One config that I'm having issues with is the user pool, in the basic usage example it says we can pass an existing user pool but I don't see an example on how to pass it, is there one or how can I pass an existing user pool since using .fromUserPoolId is not an option

ottokruse commented 5 months ago

Hi mate. That allows you to pass in a User Pool that you create in the same CDK stack, but not a User Pool that is external to the CDK stack (an IUserPool). That is not supported (yet) unfortunately, here's more info and the work around: https://github.com/aws-samples/amazon-cognito-passwordless-auth/issues/118#issuecomment-1983697750

ottokruse commented 5 months ago

If you share the CDK code you use I can be more specific to your case.

juanf9224 commented 5 months ago

Thanks! that was actually what we were looking at doing if it wasn't possible to use the existing one in the same cdk, about the used cdk, no worries, I was using the example one and testing, wanted to confirm this! 🚀