Skip to content

docs: add page on authorization strategies #4396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: 16.x.x
Choose a base branch
from

Conversation

sarahxsanders
Copy link
Contributor

Adds page on authorization strategies, right after authentication/middleware page

Also adds a "Before you start" section about using ESM syntax JS code snippets

Comment on lines 13 to 21
## Before you start

All code examples in this guide use modern JavaScript with [ES module (ESM) syntax](https://nodejs.org/api/esm.html).
To run them in Node.js, make sure to:

- Add `"type": "module"` to your `package.json`, or
- Use the `.mjs` file extension for your files

These features are supported in Node 12+ and fully stable in Node 16 and later.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoviDeCroock hello! @benjie and I were chatting today about using ESM syntax for JS code snippets. I used them here, and added this "Before you start" section to help readers with using them.

Thoughts? Open to all suggestions, this is a just a first pass on how we might approach converting all the JS snippets to ESM syntax

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a great shout! Let me run an LLM to get this going in #4400

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants