Skip to content

Commit

Permalink
Merge pull request #292 from auth0/docs/update-external-api-example
Browse files Browse the repository at this point in the history
Update external API example
  • Loading branch information
adamjmcgrath authored Feb 15, 2021
2 parents 56637e5 + d182ab7 commit 1ac9712
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ export default handleAuth({
async login(req, res) {
try {
await handleLogin(req, res, {
audience: 'https://api.example.com/products', // or AUTH0_AUDIENCE
// Add the `offline_access` scope to also get a Refresh Token
scope: 'openid profile email read:products' // or AUTH0_SCOPE
authorizationParams: {
audience: 'https://api.example.com/products', // or AUTH0_AUDIENCE
// Add the `offline_access` scope to also get a Refresh Token
scope: 'openid profile email read:products' // or AUTH0_SCOPE
}
});
} catch (error) {
res.status(error.status || 400).end(error.message);
Expand Down

0 comments on commit 1ac9712

Please sign in to comment.