Skip to content

Commit

Permalink
Added audience to webAuth snippet (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
cocojoe authored and hzalaz committed Jul 6, 2017
1 parent 593fb83 commit 08b408a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ const auth0 = new Auth0({ domain: '{YOUR_AUTH0_DOMAIN}', clientId: '{YOUR_CLIENT
```js
auth0
.webAuth
.authorize({scope: 'openid email'})
.authorize({scope: 'openid email', audience: 'https://{YOUR_AUTH0_DOMAIN}/userinfo'})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
```

> This snippet sets the `audience` to ensure OIDC compliant responses, this can also be achieved by enabling the **OIDC Conformant** switch in your Auth0 dashboard under `Client / Settings / Advanced OAuth`. For more information please check [this documentation](https://auth0.com/docs/api-auth/intro#how-to-use-the-new-flows).
### Authentication API

#### Login with Password Realm Grant
Expand Down

0 comments on commit 08b408a

Please sign in to comment.