You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am building nextjs 14 app using appwrite cloud V1.5.7, trying to authenticate users with appwrite SSR following this article "https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1"
signIn & signUp are working fine but getting issues with get LoggedIn user both return response success
after first signup get LoggedIn user working fone but after login in getting issue with get LoggedIn
export async function createSessionClient() {
const client = new Client()
.setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!)
.setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT!);
const session = cookies().get("appwrite-session");
if (!session || !session.value) {
throw new Error("No session");
}
client.setSession(session.value);
return {
get account() {
return new Account(client);
},
};
}
error in getLoggedInUser after signing
getLoggedInUser Error: No session
at createSessionClient (webpack-internal:///(rsc)/./lib/appwrite.ts:20:15)
at getLoggedInUser (webpack-internal:///(rsc)/./lib/actions/user.action.ts:56:97)
at Home (webpack-internal:///(rsc)/./app/(root)/page.tsx:21:101)
at e_ (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:264092)
at e (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:268224)
at eF (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:268712)
at eq (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:274676)
at ej (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:264920)
at e_ (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:263962)
at e (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:268224)
at eF (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:268712)
at D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:265943
at Array.toJSON (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:266407)
at stringify (<anonymous>)
at eq (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:274775)
at eJ (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:275293)
at Timeout._onTimeout (D:\STUDY\NEXTJS\javascriptmastery\jsm_banking\node_modules\next\dist\compiled\next-server\app-page.runtime.dev.js:35:265080)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
Please help me with this
Thanks in advance
The text was updated successfully, but these errors were encountered:
I am building nextjs 14 app using appwrite cloud V1.5.7, trying to authenticate users with appwrite SSR following this article "https://appwrite.io/docs/tutorials/nextjs-ssr-auth/step-1"
signIn & signUp are working fine but getting issues with get LoggedIn user both return response success
after first signup get LoggedIn user working fone but after login in getting issue with get LoggedIn
SignUp function
SignIn function
getLoggedInUser function
createSessionClient() in appwrite.ts
error in getLoggedInUser after signing
Please help me with this
Thanks in advance
The text was updated successfully, but these errors were encountered: