Merge branch 'release/2.6.0'

This commit is contained in:
Knee Cola
2025-11-25 20:08:58 +01:00
3 changed files with 12 additions and 6 deletions

View File

@@ -35,8 +35,12 @@ export const authConfig: NextAuthConfig = {
// see: https://stackoverflow.com/questions/70409219/get-user-id-from-session-in-next-auth-client
jwt({ token, account, user }) {
if (account) {
token.accessToken = account.access_token
token.id = user?.id
// console.log("(jwt) account:", account);
// console.log("(jwt) user:", user);
token.accessToken = account.access_token;
// attach Google account ID to the token
token.piggyback_providerAccountId = account.providerAccountId;
}
return token
},
@@ -45,7 +49,9 @@ export const authConfig: NextAuthConfig = {
// see: https://stackoverflow.com/questions/70409219/get-user-id-from-session-in-next-auth-client
async session({ session, token }:{ session:Session, token:any }) {
if(session.user && token) {
session.user.id = token.id;
// assign Google account ID from the token to the Session user ID
session.user.id = token.piggyback_providerAccountId;
// console.log("(jwt) token:", token);
}
return session;
},

4
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{
"name": "evidencija-rezija",
"version": "2.5.0",
"version": "2.6.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"version": "2.5.0",
"version": "2.6.0",
"dependencies": {
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.1",

View File

@@ -59,5 +59,5 @@
"engines": {
"node": ">=18.17.0"
},
"version": "2.5.0"
"version": "2.6.0"
}