fix: remove non-standard fields that would cause prisma validation errors

This commit is contained in:
Ephraim Atta-Duncan
2025-02-06 05:24:50 +00:00
parent ce1c93b2a6
commit 818b1ae520
2 changed files with 24 additions and 1 deletions

15
package-lock.json generated
View File

@@ -35722,6 +35722,21 @@
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
},
"packages/trpc/node_modules/@next/swc-win32-ia32-msvc": {
"version": "14.2.6",
"resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.6.tgz",
"integrity": "sha512-hNukAxq7hu4o5/UjPp5jqoBEtrpCbOmnUqZSKNJG8GrUVzfq0ucdhQFVrHcLRMvQcwqqDh1a5AJN9ORnNDpgBQ==",
"cpu": [
"ia32"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
} }
} }
} }

View File

@@ -193,7 +193,15 @@ export const NEXT_AUTH_OPTIONS: AuthOptions = {
idToken: true, idToken: true,
allowDangerousEmailAccountLinking: true, allowDangerousEmailAccountLinking: true,
profile(profile) { profile(profile, tokens) {
if (tokens && 'refresh_expires_in' in tokens) {
delete tokens.refresh_expires_in;
}
if (tokens && 'not-before-policy' in tokens) {
delete tokens['not-before-policy'];
}
return { return {
id: profile.sub, id: profile.sub,
email: profile.email || profile.preferred_username, email: profile.email || profile.preferred_username,