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

fix/browser-tolerate-old-call-structures #664

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

MasterKale
Copy link
Owner

I've prepared a PR that updates @simplewebauthn/browser's startRegistration() and startAuthentication() to detect and tolerate the old, pre-v11 method call (where options are passed in as a positional argument as instead of as the optionsJSON property in the options blob.) There's a lot of existing developer guidance on using SimpleWebAuthn that reflects the pre-v11 method call structure, and rather than hope it all gets updated I figured for sake of developer DX a PR like this would engender some developer goodwill.

With this PR these methods would console.warn in the browser console about needing to update the method call, but ultimately try to proceed by internally remapping the provided options to optionsJSON. The warning would also direct devs to here for more info:

https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge

Screenshots

Screenshot 2025-01-12 at 4 19 05 PM

@MasterKale MasterKale added the package:browser @simplewebauthn/browser label Jan 13, 2025
@MasterKale MasterKale merged commit faf5fe8 into master Jan 13, 2025
2 checks passed
@MasterKale MasterKale deleted the fix/browser-tolerate-old-call-structures branch January 13, 2025 00:34
@MasterKale MasterKale added this to the v13.1.0 milestone Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:browser @simplewebauthn/browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant