chore: improve oidc provider support

Adds fields to the Account model to support various pieces
of data returned by OIDC providers such as AzureAD and GitLab.

Additionally passes through the email verification status and handles
retrieving the email for providers such as AzureAD who use a different
claim instead.
This commit is contained in:
Mythie
2024-05-30 22:15:45 +10:00
parent d8d0734680
commit 70eeb1a746
3 changed files with 16 additions and 4 deletions

View File

@ -233,6 +233,10 @@ model Account {
refresh_token String? @db.Text
access_token String? @db.Text
expires_at Int?
// Some providers return created_at so we need to make it optional
created_at Int?
// Stops next-auth from crashing when dealing with AzureAD
ext_expires_in Int?
token_type String?
scope String?
id_token String? @db.Text