You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
By design, these are compatible with `@github/webauthn-json` encoding, so you can use them as a drop-in substitute. We strongly recommend doing so, since:
8
+
These should be used instead of `@github/webauthn-json`.
9
+
10
+
## 👉 Using built-in browser methods instead 👈
11
+
12
+
Here is an example for how to serialize and deserialize JSON for WebAuthn client code without using `@github/webauthn-json`:
/* Set up code to call `register()` and `authenticate()`. */
33
+
}
34
+
```
35
+
36
+
## Reasoning
37
+
38
+
`@github/webauthn-json` served as an ecosystem prototype of the functionality was [developed into the built-in browser methods](https://github.com/w3c/webauthn/wiki/Explainer:-JSON-Serialization-Methods). The built-in methods are compatible with `@github/webauthn-json` encoding, so you can use them as a drop-in substitute. We strongly recommend doing so, since:
9
39
10
40
- The browser-native JSON parsing functions are increasingly receiving fields and features (such as user-agent hints and the `prf` extension) that `@github/webauthn-json` will never receive.
11
41
- Removing `@github/webauthn-json` from your codebase will remove code from your authentication pages, reducing load times for your users and reducing the chance you will need to debug issues.
12
42
43
+
## Fallback (not recommended)
44
+
13
45
If you need to support older browsers in the short-term, consider loading this library only as a fallback:
If you think you need such a fallback, consider testing or instrumenting your code to test if this is really needed for the small percentage of affected users.
72
+
73
+
If you have any other authentication methods available, it is likely that your users will still be able to authenticate without this fallback in place. They will also receive the browser-native functionality the next time their browser updates.
74
+
37
75
<br>
76
+
77
+
--------
78
+
38
79
<br>
39
80
40
81
This project's old README contents are below:
@@ -43,6 +84,8 @@ This project's old README contents are below:
43
84
44
85
--------
45
86
87
+
<br>
88
+
46
89
# `@github/webauthn-json`
47
90
48
91
`@github/webauthn-json` is a client-side Javascript library that serves as convenience wrapper for the the [WebAuthn API](https://www.w3.org/TR/webauthn/) by encoding binary data using [base64url](https://w3c.github.io/webauthn/#sctn-dependencies) (also known as "websafe" or "urlsafe" base64).
0 commit comments