mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
Compare commits
6 Commits
@auth/core
...
@auth/pris
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf13b6c7e3 | ||
|
|
dc1a79e547 | ||
|
|
78964c115b | ||
|
|
7fa51e2a61 | ||
|
|
a79774f6e8 | ||
|
|
f779f05906 |
@@ -34,7 +34,7 @@ Most OAuth providers cannot be configured with multiple callback URLs or using a
|
|||||||
|
|
||||||
However, Auth.js **supports Preview deployments**, even **with OAuth providers**:
|
However, Auth.js **supports Preview deployments**, even **with OAuth providers**:
|
||||||
|
|
||||||
1. Determine a stable deployment URL. Eg.: A deployment whose URL does not change between builds, for example. `auth.yourdomain.com`),
|
1. Determine a stable deployment URL. Eg.: A deployment whose URL does not change between builds, for example. `auth.yourdomain.com` (using a subdomain is not a requirement, this can simply be the main site's URL too.),
|
||||||
2. Set `AUTH_REDIRECT_PROXY_URL` to that URL, adding the path up until your `[...nextauth]` route. Eg.: (`https://auth.yourdomain.com/api/auth`)
|
2. Set `AUTH_REDIRECT_PROXY_URL` to that URL, adding the path up until your `[...nextauth]` route. Eg.: (`https://auth.yourdomain.com/api/auth`)
|
||||||
3. For your OAuth provider, set the callback URL using the stable deployment URL. Eg.: For GitHub `https://auth.yourdomain.com/api/auth/callback/github`)
|
3. For your OAuth provider, set the callback URL using the stable deployment URL. Eg.: For GitHub `https://auth.yourdomain.com/api/auth/callback/github`)
|
||||||
|
|
||||||
@@ -42,6 +42,9 @@ However, Auth.js **supports Preview deployments**, even **with OAuth providers**
|
|||||||
To support preview deployments, the `AUTH_SECRET` value needs to be the same for the stable deployment and deployments that will need OAuth support.
|
To support preview deployments, the `AUTH_SECRET` value needs to be the same for the stable deployment and deployments that will need OAuth support.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
:::note
|
||||||
|
If you are storing users in a [database](reference/adapters), we recommend using a different OAuth app for development/production so that you don't mix your test and production user base.
|
||||||
|
:::
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@auth/mikro-orm-adapter",
|
"name": "@auth/mikro-orm-adapter",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "MikroORM adapter for Auth.js",
|
"description": "MikroORM adapter for Auth.js",
|
||||||
"homepage": "https://authjs.dev",
|
"homepage": "https://authjs.dev",
|
||||||
"repository": "https://github.com/nextauthjs/next-auth",
|
"repository": "https://github.com/nextauthjs/next-auth",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import type { Adapter } from "@auth/core/adapters"
|
|||||||
|
|
||||||
import { MikroORM, wrap } from "@mikro-orm/core"
|
import { MikroORM, wrap } from "@mikro-orm/core"
|
||||||
|
|
||||||
import * as defaultEntities from "./lib/entities"
|
import * as defaultEntities from "./lib/entities.js"
|
||||||
|
|
||||||
export { defaultEntities }
|
export { defaultEntities }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@auth/prisma-adapter",
|
"name": "@auth/prisma-adapter",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"description": "Prisma adapter for Auth.js",
|
"description": "Prisma adapter for Auth.js",
|
||||||
"homepage": "https://authjs.dev/reference/adapter/prisma",
|
"homepage": "https://authjs.dev/reference/adapter/prisma",
|
||||||
"repository": "https://github.com/nextauthjs/next-auth",
|
"repository": "https://github.com/nextauthjs/next-auth",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import type { Adapter, AdapterAccount } from "@auth/core/adapters"
|
|||||||
/**
|
/**
|
||||||
* ## Setup
|
* ## Setup
|
||||||
*
|
*
|
||||||
* Add this adapter to your `pages/api/[...nextauth].js` next-auth configuration object:
|
* Add this adapter to your `pages/api/auth/[...nextauth].js` next-auth configuration object:
|
||||||
*
|
*
|
||||||
* ```js title="pages/api/auth/[...nextauth].js"
|
* ```js title="pages/api/auth/[...nextauth].js"
|
||||||
* import NextAuth from "next-auth"
|
* import NextAuth from "next-auth"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@auth/sveltekit",
|
"name": "@auth/sveltekit",
|
||||||
"version": "0.3.3",
|
"version": "0.3.4",
|
||||||
"description": "Authentication for SvelteKit.",
|
"description": "Authentication for SvelteKit.",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"authentication",
|
"authentication",
|
||||||
@@ -48,7 +48,6 @@
|
|||||||
"@auth/core": "workspace:*"
|
"@auth/core": "workspace:*"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"svelte": "^3.54.0",
|
|
||||||
"@sveltejs/kit": "^1.0.0"
|
"@sveltejs/kit": "^1.0.0"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -173,7 +173,7 @@ export type WithAuthArgs =
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Middleware that checks if the user is authenticated/authorized.
|
* Middleware that checks if the user is authenticated/authorized.
|
||||||
* If if they aren't, they will be redirected to the login page.
|
* If they aren't, they will be redirected to the login page.
|
||||||
* Otherwise, continue.
|
* Otherwise, continue.
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
|
|||||||
Reference in New Issue
Block a user