File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
examples/basic/src/app/(app) Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -16,9 +16,8 @@ export function SignOutButton({
1616 headers : {
1717 "Content-Type" : "application/json" ,
1818 } ,
19- } ) . then ( ( ) => {
20- window . location . reload ( ) ;
2119 } ) ;
20+ window . location . reload ( ) ;
2221 } }
2322 >
2423 Sign Out
Original file line number Diff line number Diff line change 11import { auth } from "@/auth" ;
2- import { getPayloadUser } from "payload-authjs" ;
2+ import { getPayloadSession } from "payload-authjs" ;
33import { SignInButton } from "./_components/SignInButton" ;
44import { SignOutButton } from "./_components/SignOutButton" ;
55
66const Page = async ( ) => {
7- const session = await auth ( ) ;
8- const payloadUser = await getPayloadUser ( ) ;
7+ const authjsSession = await auth ( ) ;
8+ const payloadSession = await getPayloadSession ( ) ;
99
1010 return (
1111 < main >
12- { payloadUser ? < SignOutButton /> : < SignInButton /> }
12+ { payloadSession ? < SignOutButton /> : < SignInButton /> }
1313 < br />
1414 < h3 > Auth.js Session</ h3 >
15- < pre > { JSON . stringify ( session ?. user , null , 2 ) } </ pre >
15+ < pre > { JSON . stringify ( authjsSession , null , 2 ) } </ pre >
1616 < br />
17- < h3 > Payload CMS User </ h3 >
18- < pre > { JSON . stringify ( payloadUser , null , 2 ) } </ pre >
17+ < h3 > Payload CMS Session </ h3 >
18+ < pre > { JSON . stringify ( payloadSession , null , 2 ) } </ pre >
1919 </ main >
2020 ) ;
2121} ;
You can’t perform that action at this time.
0 commit comments