Skip to content

Commit

Permalink
Merge branch 'main' into fix/next-auth-pages-router-api-9307
Browse files Browse the repository at this point in the history
  • Loading branch information
ThangHuuVu authored Feb 25, 2024
2 parents 586c3d0 + 4a7f51c commit c1b3fc0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/docs/guides/basics/initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import TabItem from "@theme/TabItem"
<Tabs groupId="frameworks" queryString>
<TabItem value="next" label="Next.js" default>

In Next.js, you can define an API route that will catch all requests that begin with a certain path. Conveniently, this is called [Catch all API routes](https://nextjs.org/docs/api-routes/dynamic-api-routes#catch-all-api-routes).
In Next.js, you can define an API route that will catch all requests that begin with a certain path. Conveniently, this is called [Catch all API routes](https://nextjs.org/docs/api-routes/dynamic-api-routes#catch-all-api-routes) / [Catch-all Segments](https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes#catch-all-segments).

When you define a `/pages/api/auth/[...nextauth]` JS/TS file, you instruct Auth.js that every API request beginning with `/api/auth/*` should be handled by the code written in the `[...nextauth]` file.

Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-sequelize/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export interface SequelizeAdapterOptions {
*
* ### Updating the database schema
*
* By default, the sequelize adapter will not create tables in your database. In production, best practice is to create the [required tables](https://authjs.dev/reference/core/adapters/models) in your database via [migrations](https://sequelize.org/master/manual/migrations.html). In development, you are able to call [`sequelize.sync()`](https://sequelize.org/master/manual/model-basics.html#model-synchronization) to have sequelize create the necessary tables, foreign keys and indexes:
* By default, the sequelize adapter will not create tables in your database. In production, best practice is to create the [required tables](https://authjs.dev/reference/core/adapters#models) in your database via [migrations](https://sequelize.org/master/manual/migrations.html). In development, you are able to call [`sequelize.sync()`](https://sequelize.org/master/manual/model-basics.html#model-synchronization) to have sequelize create the necessary tables, foreign keys and indexes:
*
* > This schema is adapted for use in Sequelize and based upon our main [schema](https://authjs.dev/reference/core/adapters#models)
*
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* npm install @auth/core
* ```
*
* You can then import this submodule from `@auth/core/type`.
* You can then import this submodule from `@auth/core/types`.
*
* ## Usage
*
Expand Down
4 changes: 2 additions & 2 deletions packages/frameworks-express/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* You will also need to load the environment variables into your runtime environment. For example in Node.js with a package like [`dotenv`](https://www.npmjs.com/package/dotenv) or `Deno.env` in Deno.
*
* ### Provider Configuration
* The callback URL used by the [providers](https://authjs.dev/reference/core/modules/providers) must be set to the following, unless you mount the `ExpressAuth` handler on a different path:
* The callback URL used by the [providers](https://authjs.dev/reference/core/providers) must be set to the following, unless you mount the `ExpressAuth` handler on a different path:
*
* ```
* [origin]/auth/callback/[provider]
Expand Down Expand Up @@ -66,7 +66,7 @@
* This can either be done per route, or for a group of routes using a middleware such as the following:
*
* ```ts
* export function authenticatedUser(
* export async function authenticatedUser(
* req: Request,
* res: Response,
* next: NextFunction
Expand Down
2 changes: 1 addition & 1 deletion packages/frameworks-sveltekit/src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
* :::danger
* Make sure to ALWAYS grab the session information from the parent instead of using the store in the case of a `PageLoad`.
* Not doing so can lead to users being able to incorrectly access protected information in the case the `+layout.server.ts` does not run for that page load.
* This code sample already implements the correct method by using `const { session } = await parent();`
* This code sample already implements the correct method by using `const { session } = await parent();`. For more information on SvelteKit's `load` functionality behaviour and its implications on authentication, see this [SvelteKit docs section](https://kit.svelte.dev/docs/load#implications-for-authentication).
* :::
*
* You should NOT put authorization logic in a `+layout.server.ts` as the logic is not guaranteed to propagate to leafs in the tree.
Expand Down

0 comments on commit c1b3fc0

Please sign in to comment.