fix azure errors

This commit is contained in:
Thomas Schuster 2024-05-26 17:31:22 +02:00
parent 5f34f03355
commit 7e98de6122
No known key found for this signature in database
GPG Key ID: 544A536BA1ECC9E7

View File

@ -370,7 +370,15 @@ if (process.env.NEXT_PUBLIC_AZURE_AD_ENABLED === "true") {
const _linkAccount = adapter.linkAccount;
adapter.linkAccount = (account) => {
const { "not-before-policy": _, refresh_expires_in, ...data } = account;
const {
"not-before-policy": _,
refresh_expires_in,
refresh_token_expires_in,
not_before,
id_token_expires_in,
profile_info,
...data
} = account;
return _linkAccount ? _linkAccount(data) : undefined;
};
}
@ -387,7 +395,15 @@ if (process.env.NEXT_PUBLIC_AZURE_AD_ENABLED === "true") {
const _linkAccount = adapter.linkAccount;
adapter.linkAccount = (account) => {
const { "not-before-policy": _, refresh_expires_in, ...data } = account;
const {
"not-before-policy": _,
refresh_expires_in,
token_type,
expires_in,
ext_expires_in,
access_token,
...data
} = account;
return _linkAccount ? _linkAccount(data) : undefined;
};
}