Skip to content

Conversation

@jake-slashid
Copy link
Contributor

Adding passkey support detection to the auth method selector in <Form>

This PR is just barely working, full of debugs and in need of some TLC.

Coming soon!

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 4, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c92fbb1
Status: ✅  Deploy successful!
Preview URL: https://9a43ffdc.website-react-storybook.pages.dev
Branch Preview URL: https://passkey-detect.website-react-storybook.pages.dev

View logs

@@ -0,0 +1,3 @@
import { Utils } from "@slashid/slashid";

export const runtimeSupportsPasskeys = Utils.runtimeSupportsBestPasskeyUX();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might cause trouble if executed server side. Can we make sure this either runs client side only or gets parametrised so the user agent string is passed in? Server side we can read it from the HTTP request.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally agree, I will need some help from you to consider SSR edge-cases since you're most familiar with the things we've previously delivered in this space.


const passkeySupportDetectionLoading = showPasskeys === null;
if (passkeySupportDetectionLoading) {
return null;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally this would be a skeleton or some sort of placeholder, so we can avoid layout shifts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

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

Successfully merging this pull request may close these issues.

4 participants