mirror of
https://github.com/documenso/documenso.git
synced 2026-07-25 09:25:08 +10:00
fix: remove non-standard fields that would cause prisma validation errors
This commit is contained in:
@@ -193,7 +193,15 @@ export const NEXT_AUTH_OPTIONS: AuthOptions = {
|
||||
idToken: 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 {
|
||||
id: profile.sub,
|
||||
email: profile.email || profile.preferred_username,
|
||||
|
||||
Reference in New Issue
Block a user