From 60a0a8c37e91d8c019218b88c34bf64c30f784e5 Mon Sep 17 00:00:00 2001 From: Tsukuru Tanimichi Date: Sat, 27 Jun 2026 21:57:27 +0900 Subject: [PATCH 1/3] Replace @github/webauthn-json references with built-in browser methods --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 9fb0d6cd..195c89ff 100644 --- a/README.md +++ b/README.md @@ -191,15 +191,15 @@ session[:creation_challenge] = options.challenge # If inside a Rails controller, `render json: options` will just work. # I.e. it will encode and convert the options to JSON automatically. -# For your frontend code, you might find @github/webauthn-json npm package useful. -# Especially for handling the necessary decoding of the options, and sending the -# `PublicKeyCredential` object back to the server. +# For your frontend code, you might find the built-in browser methods useful. +# Especially the built-in `PublicKeyCredential.parseCreationOptionsFromJSON(options)` for decoding the options, and +# the built-in `credential.toJSON()` for sending the `PublicKeyCredential` object back to the server. ``` #### Verification phase ```ruby -# Assuming you're using @github/webauthn-json package to send the `PublicKeyCredential` object back +# Assuming you're using the built-in `credential.toJSON()` to send the `PublicKeyCredential` object back # in params[:publicKeyCredential]: webauthn_credential = WebAuthn::Credential.from_create(params[:publicKeyCredential]) @@ -238,9 +238,9 @@ session[:authentication_challenge] = options.challenge # If inside a Rails controller, `render json: options` will just work. # I.e. it will encode and convert the options to JSON automatically. -# For your frontend code, you might find @github/webauthn-json npm package useful. -# Especially for handling the necessary decoding of the options, and sending the -# `PublicKeyCredential` object back to the server. +# For your frontend code, you might find the built-in browser methods useful. +# Especially the built-in `PublicKeyCredential.parseRequestOptionsFromJSON(options)` for decoding the options, and +# the built-in `credential.toJSON()` for sending the `PublicKeyCredential` object back to the server. ``` #### Verification phase @@ -250,7 +250,7 @@ interface returned by the browser to the stored `credential_id`. The correspondi attributes must be passed as keyword arguments to the `verify` method call. ```ruby -# Assuming you're using @github/webauthn-json package to send the `PublicKeyCredential` object back +# Assuming you're using the built-in `credential.toJSON()` to send the `PublicKeyCredential` object back # in params[:publicKeyCredential]: webauthn_credential = WebAuthn::Credential.from_get(params[:publicKeyCredential]) From f35d2f433749f48efa4981de807ff98f37ad70f5 Mon Sep 17 00:00:00 2001 From: Tsukuru Tanimichi Date: Fri, 3 Jul 2026 16:44:47 +0900 Subject: [PATCH 2/3] Update README.md Co-authored-by: Santiago Rodriguez <46354312+santiagorodriguez96@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 195c89ff..3555de91 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ session[:authentication_challenge] = options.challenge # If inside a Rails controller, `render json: options` will just work. # I.e. it will encode and convert the options to JSON automatically. -# For your frontend code, you might find the built-in browser methods useful. +# For your frontend code, you might find the [built-in browser methods](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential) useful. # Especially the built-in `PublicKeyCredential.parseRequestOptionsFromJSON(options)` for decoding the options, and # the built-in `credential.toJSON()` for sending the `PublicKeyCredential` object back to the server. ``` From ce8a7453176f53ecc7aba140661fcdefac059567 Mon Sep 17 00:00:00 2001 From: Tsukuru Tanimichi Date: Fri, 3 Jul 2026 19:10:50 +0900 Subject: [PATCH 3/3] Reword frontend guidance and add MDN link in README --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3555de91..add72df1 100644 --- a/README.md +++ b/README.md @@ -191,9 +191,9 @@ session[:creation_challenge] = options.challenge # If inside a Rails controller, `render json: options` will just work. # I.e. it will encode and convert the options to JSON automatically. -# For your frontend code, you might find the built-in browser methods useful. -# Especially the built-in `PublicKeyCredential.parseCreationOptionsFromJSON(options)` for decoding the options, and -# the built-in `credential.toJSON()` for sending the `PublicKeyCredential` object back to the server. +# For your frontend code, you might find the [built-in browser methods](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential) useful. +# The built-in `PublicKeyCredential.parseCreationOptionsFromJSON(options)` allows you to decode the options, +# and the built-in `credential.toJSON()` to send the `PublicKeyCredential` object back to the server. ``` #### Verification phase @@ -239,8 +239,8 @@ session[:authentication_challenge] = options.challenge # I.e. it will encode and convert the options to JSON automatically. # For your frontend code, you might find the [built-in browser methods](https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential) useful. -# Especially the built-in `PublicKeyCredential.parseRequestOptionsFromJSON(options)` for decoding the options, and -# the built-in `credential.toJSON()` for sending the `PublicKeyCredential` object back to the server. +# The built-in `PublicKeyCredential.parseRequestOptionsFromJSON(options)` allows you to decode the options, +# and the built-in `credential.toJSON()` to send the `PublicKeyCredential` object back to the server. ``` #### Verification phase