From 7492bd0de1faa49cb4adf3e82696db1245a544b8 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Fri, 27 Oct 2023 12:45:30 +0200 Subject: [PATCH 1/2] Add 'rpName' to Javascript client documentation --- src/guide/frontend/javascript.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/guide/frontend/javascript.md b/src/guide/frontend/javascript.md index 38bdb13f..0844a1af 100644 --- a/src/guide/frontend/javascript.md +++ b/src/guide/frontend/javascript.md @@ -23,7 +23,7 @@ In all cases, your frontend must import the library to call the methods in this ```js import { Client } from '@passwordlessdev/passwordless-client'; -const p = new Client({ apiKey: '' }); +const p = new Client({ apiKey: '', rpName: 'My App' }); ``` @@ -37,7 +37,7 @@ In all cases, your frontend must import the library to call the methods in this ```js import { Client } from '@passwordlessdev/passwordless-client'; -const p = new Client({ apiKey: '' }); +const p = new Client({ apiKey: '', rpName: 'My App' }); ``` @@ -48,7 +48,7 @@ In all cases, your frontend must import the library to call the methods in this ```html ``` @@ -81,7 +81,8 @@ Call the `.register()` method to fetch a [registration token](../concepts.md#tok ```js // Instantiate a passwordless client using your API public key. const p = new Passwordless.Client({ - apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8' + apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8', + rpName: 'My App' }); // Fetch the registration token from the backend. @@ -110,7 +111,8 @@ Call the `.signin` methods to generate a [verification token](../concepts.md#tok ```js // Instantiate a passwordless client using your API public key. const p = new Passwordless.Client({ - apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8' + apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8', + rpName: 'My App', // Required, human readable name of your app }); // Generate a verification token for the user. From 6ec5da2b075507f59202b15a2a19c9571a254445 Mon Sep 17 00:00:00 2001 From: Jonas Hendrickx Date: Fri, 27 Oct 2023 12:45:52 +0200 Subject: [PATCH 2/2] Add 'rpName' to Javascript client documentation --- src/guide/frontend/javascript.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/guide/frontend/javascript.md b/src/guide/frontend/javascript.md index 0844a1af..64621e6d 100644 --- a/src/guide/frontend/javascript.md +++ b/src/guide/frontend/javascript.md @@ -81,7 +81,7 @@ Call the `.register()` method to fetch a [registration token](../concepts.md#tok ```js // Instantiate a passwordless client using your API public key. const p = new Passwordless.Client({ - apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8', + apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8', rpName: 'My App' }); @@ -112,7 +112,7 @@ Call the `.signin` methods to generate a [verification token](../concepts.md#tok // Instantiate a passwordless client using your API public key. const p = new Passwordless.Client({ apiKey: 'myapplication:public:4364b1a49a404b38b843fe3697b803c8', - rpName: 'My App', // Required, human readable name of your app + rpName: 'My App' // Required, human readable name of your app }); // Generate a verification token for the user.