Skip to content

Commit 18e8b92

Browse files
goerlitzThangHuuVu
andauthored
fix(dev): fix import links for authOptions (#8938)
* fixed instruction link * fixed import link of authOptions in dev app * deleted old, obsolete authOptions --------- Co-authored-by: Thang Vu <[email protected]>
1 parent 09f5aab commit 18e8b92

File tree

8 files changed

+7
-139
lines changed

8 files changed

+7
-139
lines changed

apps/dev/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
This folder contains a Next.js app using NextAuth.js for local development. See the following section on how to start:
44

55
[Setting up local environment
6-
](https://github.com/nextauthjs/next-auth/blob/main/CONTRIBUTING.md#setting-up-local-environment)
6+
](https://github.com/nextauthjs/.github/blob/main/CONTRIBUTING.md#setting-up-local-environment)

apps/dev/pages/api/auth-old/[...nextauth].ts

-132
This file was deleted.

apps/dev/pages/api/examples/protected.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is an example of to protect an API route
22
import { getServerSession } from "next-auth/next"
3-
import { authOptions } from "../auth/[...nextauth]"
3+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
44

55
export default async (req, res) => {
66
const session = await getServerSession(req, res, authOptions)

apps/dev/pages/api/examples/session.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is an example of how to access a session from an API route
22
import { getServerSession } from "next-auth/next"
3-
import { authOptions } from "../auth/[...nextauth]"
3+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
44

55
export default async (req, res) => {
66
const session = await getServerSession(req, res, authOptions)

apps/dev/pages/api/examples/supabase-rls.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This is an example of how to query data from Supabase with RLS.
22
// Learn more about Row Levele Security (RLS): https://supabase.com/docs/guides/auth/row-level-security
33
import { getServerSession } from "next-auth/next"
4-
import { authOptions } from "../auth/[...nextauth]"
4+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
55
import { createClient } from "@supabase/supabase-js"
66

77
export default async (req, res) => {

apps/dev/pages/protected-ssr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This is an example of how to protect content using server rendering
22
import { getServerSession } from "next-auth/next"
3-
import { authOptions } from "./api/auth/[...nextauth]"
3+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
44
import Layout from "../components/layout"
55
import AccessDenied from "../components/access-denied"
66

apps/dev/pages/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { getServerSession } from "next-auth/next"
22
import Layout from "../components/layout"
3-
import { authOptions } from "./api/auth/[...nextauth]"
3+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
44

55
export default function Page() {
66
// As this page uses Server Side Rendering, the `session` will be already

apps/dev/pages/supabase-ssr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This is an example of how to protect content using server rendering
22
// and fetching data from Supabase with RLS enabled.
33
import { getServerSession } from "next-auth/next"
4-
import { authOptions } from "./api/auth/[...nextauth]"
4+
import { authOptions } from "/app/api/auth/[...nextauth]/route"
55
import { createClient } from "@supabase/supabase-js"
66
import Layout from "../components/layout"
77
import AccessDenied from "../components/access-denied"

0 commit comments

Comments
 (0)