Skip to content

Commit

Permalink
Fixes the numbering on examples (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpatrick authored Sep 17, 2020
1 parent ec5416e commit 8b1a966
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Please note that the login and logout routes are not required. Trying to access

Full example at [custom-routes.js](./examples/custom-routes.js), to run it: `npm run start:example -- custom-routes`

## 3. Obtaining access tokens to call external APIs
## 4. Obtaining access tokens to call external APIs

If your application needs an [access token](https://auth0.com/docs/tokens/access-tokens) for external APIs you can request one by adding `code` to your `response_type`. The Access Token will be available on the request context:

Expand Down Expand Up @@ -116,7 +116,7 @@ app.get('/', async (req, res) => {

Full example at [access-an-api.js](./examples/access-an-api.js), to run it: `npm run start:example -- access-an-api`

## 4. Obtaining and using refresh tokens
## 5. Obtaining and using refresh tokens

[Refresh tokens](https://auth0.com/docs/tokens/concepts/refresh-tokens) can be requested along with access tokens using the `offline_access` scope during login. On a route that calls an API, check for an expired token and attempt a refresh:

Expand Down Expand Up @@ -147,7 +147,7 @@ app.get('/', async (req, res) => {

Full example at [access-an-api.js](./examples/access-an-api.js), to run it: `npm run start:example -- access-an-api`

## 5. Calling userinfo
## 6. Calling userinfo

If your application needs to call the `/userinfo` endpoint you can use the `fetchUserInfo` method on the request context:

Expand Down

0 comments on commit 8b1a966

Please sign in to comment.