Skip to content

Commit

Permalink
fixed formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dagnelies committed Oct 30, 2023
1 parent 1b3a828 commit 044672c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions getting_started/javascript_spa.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Getting Started - Javascript
- The demo can be seen here: https://passwordless-id.github.io/demo/
- The full source code is available here: https://github.com/passwordless-id/demo

1. Create an HTML page
----------------------
Create an HTML page
-------------------

```html
<!DOCTYPE html>
Expand Down Expand Up @@ -40,8 +40,8 @@ Getting Started - Javascript
```


2. Trigger the sign-in
----------------------
Trigger the sign-in
--------------------

It uses the OAuth2 / OpenID flow using the [@passwordless-id/connect](https://github.com/passwordless-id/connect) library.

Expand Down Expand Up @@ -75,8 +75,8 @@ async function init() {
init()
```

3. Show the profile
-------------------
Show the profile
----------------

The retrieved `user` has the following structure.

Expand All @@ -94,10 +94,10 @@ The retrieved `user` has the following structure.
}
```

4. Trigger the sign-out
-----------------------
Trigger the sign-out
--------------------

5. Using the token for API calls
--------------------------------
Using the token for API calls
-----------------------------

Once you obtain the user, you can also send the `token_id` to your server API as proof of the user's authenticity. This is a Json Web Token containing a signature that can be verified by common libraries.

0 comments on commit 044672c

Please sign in to comment.