Skip to content
Back

Anyone tried Appwrite 1.6 with Next.js 15? No session.secret anymore!

  • 0
  • General
  • Web
Ivan Skodje
28 Oct, 2024, 09:33

I have tried converting my project to Next.js 15, and noticed that we are not getting any secrets returned (I have not changed any other code) besides updating to Next.js 15, so I am wondering if this problem is exclusive to my project, or if anyone else have upgraded to Next.js 15 and can confirm it working?

appwrite-node previously returned a session with a secret:

TypeScript
const { account } = await createAdminClient();
const session: Models.Session = await account.createEmailPasswordSession(email, password);

When I was debugging, i just printed the session.secret and got no value anymore. 🤔

Additional Info:

  • It works when I run it locally, but not after deploying it. In other words, "It works on my machine".
  • Currently testing to see if this is caused by the docker environment...

When I log the session object:

TypeScript
{
  "$id": "671f5be83e65366b4128",
  "$createdAt": "2024-10-28T09:39:52.264+00:00",
  "$updatedAt": "2024-10-28T09:39:52.264+00:00",
  "userId": "671bbab1001e4f53c97c",
  "expire": "2025-10-28T09:39:52.255+00:00",
  "provider": "email",
  "providerUid": "user@fakemail.no",
  "providerAccessToken": "",
  "providerAccessTokenExpiry": "",
  "providerRefreshToken": "",
  "ip": "12.3.4.fake",
  "osCode": "LIN",
  "osName": "GNU/Linux ftw",
  "osVersion": "",
  "clientType": "",
  "clientCode": "",
  "clientName": "",
  "clientVersion": "",
  "clientEngine": "",
  "clientEngineVersion": "",
  "deviceName": "desktop",
  "deviceBrand": "",
  "deviceModel": "",
  "countryCode": "de",
  "countryName": "Germany",
  "current": true,
  "factors": [
    "password"
  ],
  "secret": "",
  "mfaUpdatedAt": ""
}
TL;DR
Developers are facing issues with Appwrite 1.6 and Next.js 15 - specifically, the absence of `session.secret`. It works locally but not after deployment. The problem persists even with a docker environment. No concrete solution provided yet.
Ivan Skodje
28 Oct, 2024, 09:45

Anyone tried Appwrite 1.6 with Next.js 15? No session.secret anymore!

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more