File tree 8 files changed +7
-139
lines changed
8 files changed +7
-139
lines changed Original file line number Diff line number Diff line change 3
3
This folder contains a Next.js app using NextAuth.js for local development. See the following section on how to start:
4
4
5
5
[ 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 )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
// This is an example of to protect an API route
2
2
import { getServerSession } from "next-auth/next"
3
- import { authOptions } from "../ auth/[...nextauth]"
3
+ import { authOptions } from "/app/api/ auth/[...nextauth]/route "
4
4
5
5
export default async ( req , res ) => {
6
6
const session = await getServerSession ( req , res , authOptions )
Original file line number Diff line number Diff line change 1
1
// This is an example of how to access a session from an API route
2
2
import { getServerSession } from "next-auth/next"
3
- import { authOptions } from "../ auth/[...nextauth]"
3
+ import { authOptions } from "/app/api/ auth/[...nextauth]/route "
4
4
5
5
export default async ( req , res ) => {
6
6
const session = await getServerSession ( req , res , authOptions )
Original file line number Diff line number Diff line change 1
1
// This is an example of how to query data from Supabase with RLS.
2
2
// Learn more about Row Levele Security (RLS): https://supabase.com/docs/guides/auth/row-level-security
3
3
import { getServerSession } from "next-auth/next"
4
- import { authOptions } from "../ auth/[...nextauth]"
4
+ import { authOptions } from "/app/api/ auth/[...nextauth]/route "
5
5
import { createClient } from "@supabase/supabase-js"
6
6
7
7
export default async ( req , res ) => {
Original file line number Diff line number Diff line change 1
1
// This is an example of how to protect content using server rendering
2
2
import { getServerSession } from "next-auth/next"
3
- import { authOptions } from "./ api/auth/[...nextauth]"
3
+ import { authOptions } from "/app/ api/auth/[...nextauth]/route "
4
4
import Layout from "../components/layout"
5
5
import AccessDenied from "../components/access-denied"
6
6
Original file line number Diff line number Diff line change 1
1
import { getServerSession } from "next-auth/next"
2
2
import Layout from "../components/layout"
3
- import { authOptions } from "./ api/auth/[...nextauth]"
3
+ import { authOptions } from "/app/ api/auth/[...nextauth]/route "
4
4
5
5
export default function Page ( ) {
6
6
// As this page uses Server Side Rendering, the `session` will be already
Original file line number Diff line number Diff line change 1
1
// This is an example of how to protect content using server rendering
2
2
// and fetching data from Supabase with RLS enabled.
3
3
import { getServerSession } from "next-auth/next"
4
- import { authOptions } from "./ api/auth/[...nextauth]"
4
+ import { authOptions } from "/app/ api/auth/[...nextauth]/route "
5
5
import { createClient } from "@supabase/supabase-js"
6
6
import Layout from "../components/layout"
7
7
import AccessDenied from "../components/access-denied"
You can’t perform that action at this time.
0 commit comments