Skip to content

Commit

Permalink
🐛 fix: providerAccountId not exist in provider (lobehub#4053)
Browse files Browse the repository at this point in the history
* 🐛 fix: fix providerAccountId not exist in casdoor

* 🐛 fix: providerAccountId not provided
  • Loading branch information
cy948 authored Sep 21, 2024
1 parent 70c7121 commit 91d8999
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/auth0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const provider = {
profile(profile) {
return {
email: profile.email,
id: profile.sub,
image: profile.picture,
name: profile.name,
providerAccountId: profile.sub,
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/authelia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const provider = {
profile(profile) {
return {
email: profile.email,
id: profile.sub,
name: profile.name,
providerAccountId: profile.sub,
};
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/authentik.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const provider = {
// image: profile.picture,
// name: profile.name,
// providerAccountId: profile.user_id,
// id: profile.user_id,
// };
// },
}),
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/azure-ad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const provider = {
// image: profile.picture,
// name: profile.name,
// providerAccountId: profile.user_id,
// id: profile.user_id,
// };
// },
}),
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/casdoor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function LobeCasdoorProvider(config: OIDCUserConfig<CasdoorProfile>): OIDCConfig
return {
email: profile.email,
emailVerified: profile.emailVerified ? new Date() : null,
id: profile.id,
image: profile.avatar,
name: profile.displayName ?? profile.firstName ?? profile.lastName,
providerAccountId: profile.id,
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/cloudflare-zero-trust.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const provider = {
profile(profile) {
return {
email: profile.email,
id: profile.sub,
name: profile.name ?? profile.email,
providerAccountId: profile.sub,
};
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const provider = {
profile: (profile) => {
return {
email: profile.email,
id: profile.id.toString(),
image: profile.avatar_url,
name: profile.name,
providerAccountId: profile.id.toString(),
Expand Down
1 change: 1 addition & 0 deletions src/libs/next-auth/sso-providers/zitadel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const provider = {
// image: profile.picture,
// name: profile.name,
// providerAccountId: profile.user_id,
// id: profile.user_id,
// };
// },
}),
Expand Down

0 comments on commit 91d8999

Please sign in to comment.