Skip to content

Commit

Permalink
Merge branch 'main' into samroehrich-update_session_docs_update
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath authored Dec 6, 2022
2 parents 3225835 + 485941f commit ea23621
Show file tree
Hide file tree
Showing 2 changed files with 229 additions and 287 deletions.
2 changes: 1 addition & 1 deletion EXAMPLES.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Requests to `/pages/api/protected` without a valid session cookie will fail with
import { withApiAuthRequired, getSession } from '@auth0/nextjs-auth0';

export default withApiAuthRequired(async function myApiRoute(req, res) {
const { user } = getSession(req, res);
const { user } = await getSession(req, res);
res.json({ protected: 'My Secret', id: user.sub });
});
```
Expand Down
Loading

0 comments on commit ea23621

Please sign in to comment.