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

Support required field "rp.name" #62

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/guide/frontend/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -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' });
```

</template>
Expand All @@ -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' });
```

</template>
Expand All @@ -48,7 +48,7 @@ In all cases, your frontend must import the library to call the methods in this
```html
<script type="module">
import { Client } from 'https://cdn.passwordless.dev/dist/1.1.0/esm/passwordless.min.mjs';
const p = new Client({ apiKey: '' });
const p = new Client({ apiKey: '', rpName: 'My App' });
</script>
```

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
Loading