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

Examples updated for Passkeys #68

Open
johnnymast opened this issue Jan 17, 2024 · 3 comments
Open

Examples updated for Passkeys #68

johnnymast opened this issue Jan 17, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@johnnymast
Copy link

Hi @Firehed,

First of all, I want to thank you for your work with this package. I am using the package myself and I allow my users to generate a passkey for their existing accounts. But when I tried to log in with a passkey on my iOS device (by scanning the QR code in the browser) the app on iOS just kept loading infinitely. Then I went looking for answers on your README and I found out that the routines are a bit different for passkeys. So my question is when can we expect the updated documentation?

Kind regards,

Johnny Mast

@Firehed
Copy link
Owner

Firehed commented Jan 17, 2024

Hi @johnnymast,

I'm glad you're finding the library useful!

I just reviewed the docs on main, and the existing sample for authentication should work fine when using passkeys. What that example doesn't support yet (and what the readme comment was alluding to) is the conditional mediation flow; i.e. autofill-assisted sign-in. If you're getting to the point of the browser prompting signing in (which the QR code strongly suggests), all of the initial requests and setup are probably correct.

During testing and development, I've noticed that Safari (both iOS and desktop) can get a bit fussy at times, especially with cross-device sign in flows, but nothing I've seen suggests it's something the library or client code can really influence.

If you're able to provide some samples in terms of network traffic or even some simple log calls to determine where things are hanging I'm happy to take a look. Based on your description, I think it's something on the JS side.

console.debug(getOptions)
const credential = await navigator.credentials.get(getOptions) // existing call
console.debug(credential)

I'm also assuming that you're referring to signing in to a web app on iOS, not a native one. Please let me know if that's not the case! I don't yet have any experience with that particular Swift code, though from what I've read on apple's dev docs this should all work fine as long as the data formats are converted correctly.

@johnnymast
Copy link
Author

Hi @Firehed ,

Thanks for your fast reaction and i got it working locally now (in the browser) and I am uploading my site changes to deployment to test a live login. The thing is I didn't try to use the web app on mobile what I did is the following.

I went to my browser and a QR code popup would show during login and when I scanned the code with the native iOS camera app it recognizes it as a passkey. It then opens 1Pasword to use the passkey and then it keeps loading like it tries to communicate with the website but something blocks the communication (as a time-out) but its just a case but it feels like it.

@johnnymast
Copy link
Author

Update, it works! Awesome. I did use the web app this time gave the email then pressed the passkey login and it worked via 1password now.

BTW: I was looking into your open issues here for things I could help with. I might try to pick one up if i have time.

@Firehed Firehed added the documentation Improvements or additions to documentation label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants