Skip to content

Commit 8288ae5

Browse files
authoredApr 22, 2022
fix(providers): profile types (#4202)
1 parent 9f40cd1 commit 8288ae5

30 files changed

+130
-106
lines changed
 

‎packages/next-auth/src/providers/42-school.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,7 @@ export interface CampusUser {
134134
created_at: string
135135
updated_at: string | null
136136
}
137-
138-
export interface FortyTwoProfile extends UserData {
137+
export interface FortyTwoProfile extends UserData, Record<string, any> {
139138
groups: Array<{ id: string; name: string }>
140139
cursus_users: CursusUser[]
141140
projects_users: ProjectUser[]
@@ -153,9 +152,9 @@ export interface FortyTwoProfile extends UserData {
153152
user: any | null
154153
}
155154

156-
export default function FortyTwo<
157-
P extends Record<string, any> = FortyTwoProfile
158-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
155+
export default function FortyTwo<P extends FortyTwoProfile>(
156+
options: OAuthUserConfig<P>
157+
): OAuthConfig<P> {
159158
return {
160159
id: "42-school",
161160
name: "42 School",

‎packages/next-auth/src/providers/apple.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { OAuthConfig, OAuthUserConfig } from "."
55
* [Retrieve the User's Information from Apple ID Servers
66
](https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple#3383773)
77
*/
8-
export interface AppleProfile {
8+
export interface AppleProfile extends Record<string, any> {
99
/**
1010
* The issuer registered claim identifies the principal that issued the identity token.
1111
* Since Apple generates the token, the value is `https://appleid.apple.com`.
@@ -87,7 +87,7 @@ export interface AppleProfile {
8787
auth_time: number
8888
}
8989

90-
export default function Apple<P extends Record<string, any> = AppleProfile>(
90+
export default function Apple<P extends AppleProfile>(
9191
options: Omit<OAuthUserConfig<P>, "clientSecret"> & {
9292
/**
9393
* Apple requires the client secret to be a JWT. You can generate one using the following script:

‎packages/next-auth/src/providers/atlassian.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
interface AtlassianProfile {
3+
interface AtlassianProfile extends Record<string, any> {
44
account_id: string
55
name: string
66
email: string

‎packages/next-auth/src/providers/auth0.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface Auth0Profile {
3+
export interface Auth0Profile extends Record<string, any> {
44
sub: string
55
nickname: string
66
email: string
77
picture: string
88
}
99

10-
export default function Auth0<P extends Record<string, any> = Auth0Profile>(
10+
export default function Auth0<P extends Auth0Profile>(
1111
options: OAuthUserConfig<P>
1212
): OAuthConfig<P> {
1313
return {

‎packages/next-auth/src/providers/authentik.ts

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface AuthentikProfile {
4-
iss: string,
5-
sub: string,
6-
aud: string,
7-
exp: number,
8-
iat: number,
9-
auth_time: number,
10-
acr: string,
11-
c_hash: string,
12-
nonce: string,
13-
at_hash: string,
14-
email: string,
15-
email_verified: boolean,
16-
name: string,
17-
given_name: string,
18-
family_name: string,
19-
preferred_username: string,
20-
nickname: string,
3+
export interface AuthentikProfile extends Record<string, any> {
4+
iss: string
5+
sub: string
6+
aud: string
7+
exp: number
8+
iat: number
9+
auth_time: number
10+
acr: string
11+
c_hash: string
12+
nonce: string
13+
at_hash: string
14+
email: string
15+
email_verified: boolean
16+
name: string
17+
given_name: string
18+
family_name: string
19+
preferred_username: string
20+
nickname: string
2121
groups: string[]
2222
}
2323

24-
export default function Authentik<
25-
P extends Record<string, any> = AuthentikProfile
26-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
24+
export default function Authentik<P extends AuthentikProfile>(
25+
options: OAuthUserConfig<P>
26+
): OAuthConfig<P> {
2727
return {
2828
id: "authentik",
2929
name: "Authentik",

‎packages/next-auth/src/providers/azure-ad-b2c.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface AzureB2CProfile {
3+
export interface AzureB2CProfile extends Record<string, any> {
44
exp: number
55
nbf: number
66
ver: string
@@ -17,9 +17,7 @@ export interface AzureB2CProfile {
1717
tfp: string
1818
}
1919

20-
export default function AzureADB2C<
21-
P extends Record<string, any> = AzureB2CProfile
22-
>(
20+
export default function AzureADB2C<P extends AzureB2CProfile>(
2321
options: OAuthUserConfig<P> & {
2422
primaryUserFlow: string
2523
tenantId: string

‎packages/next-auth/src/providers/azure-ad.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface AzureADProfile {
3+
export interface AzureADProfile extends Record<string, any> {
44
sub: string
55
nicname: string
66
email: string
77
picture: string
88
}
99

10-
export default function AzureAD<P extends Record<string, any> = AzureADProfile>(
10+
export default function AzureAD<P extends AzureADProfile>(
1111
options: OAuthUserConfig<P> & {
1212
/**
1313
* https://docs.microsoft.com/en-us/graph/api/profilephoto-get?view=graph-rest-1.0#examples

‎packages/next-auth/src/providers/battlenet.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface BattleNetProfile {
3+
export interface BattleNetProfile extends Record<string, any> {
44
sub: string
55
battle_tag: string
66
}
@@ -10,9 +10,9 @@ export type BattleNetIssuer =
1010
| "https://www.battlenet.com.cn/oauth"
1111
| `https://${"us" | "eu" | "kr" | "tw"}.battle.net/oauth`
1212

13-
export default function BattleNet<
14-
P extends Record<string, any> = BattleNetProfile
15-
>(options: OAuthUserConfig<P> & { issuer: BattleNetIssuer }): OAuthConfig<P> {
13+
export default function BattleNet<P extends BattleNetProfile>(
14+
options: OAuthUserConfig<P> & { issuer: BattleNetIssuer }
15+
): OAuthConfig<P> {
1616
return {
1717
id: "battlenet",
1818
name: "Battle.net",

‎packages/next-auth/src/providers/boxyhq-saml.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface BoxyHQSAMLProfile {
3+
export interface BoxyHQSAMLProfile extends Record<string, any> {
44
id: string
55
email: string
66
firstName?: string
77
lastName?: string
88
}
99

10-
export default function SAMLJackson<
11-
P extends Record<string, any> = BoxyHQSAMLProfile
12-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
10+
export default function SAMLJackson<P extends BoxyHQSAMLProfile>(
11+
options: OAuthUserConfig<P>
12+
): OAuthConfig<P> {
1313
return {
1414
id: "boxyhq-saml",
1515
name: "BoxyHQ SAML",
@@ -34,4 +34,4 @@ export default function SAMLJackson<
3434
},
3535
options,
3636
}
37-
}
37+
}

‎packages/next-auth/src/providers/cognito.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface CognitoProfile {
3+
export interface CognitoProfile extends Record<string, any> {
44
sub: string
55
name: string
66
email: string
77
picture: string
88
}
99

10-
export default function Cognito<P extends Record<string, any> = CognitoProfile>(
10+
export default function Cognito<P extends CognitoProfile>(
1111
options: OAuthUserConfig<P>
1212
): OAuthConfig<P> {
1313
return {

‎packages/next-auth/src/providers/discord.js renamed to ‎packages/next-auth/src/providers/discord.ts

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
1-
/** @type {import(".").OAuthProvider} */
2-
export default function Discord(options) {
1+
import type { OAuthConfig, OAuthUserConfig } from "."
2+
3+
export interface DiscordProfile extends Record<string, any> {
4+
accent_color: number
5+
avatar: string
6+
banner: string
7+
banner_color: string
8+
discriminator: string
9+
email: string
10+
flags: number
11+
id: string
12+
image_url: string
13+
locale: string
14+
mfa_enabled: boolean
15+
premium_type: number
16+
public_flags: number
17+
username: string
18+
verified: boolean
19+
}
20+
21+
export default function Discord<P extends DiscordProfile>(
22+
options: OAuthUserConfig<P>
23+
): OAuthConfig<P> {
324
return {
425
id: "discord",
526
name: "Discord",

‎packages/next-auth/src/providers/eveonline.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface EVEOnlineProfile {
3+
export interface EVEOnlineProfile extends Record<string, any> {
44
CharacterID: number
55
CharacterName: string
66
ExpiresOn: string
@@ -10,9 +10,9 @@ export interface EVEOnlineProfile {
1010
IntellectualProperty: string
1111
}
1212

13-
export default function EVEOnline<
14-
P extends Record<string, any> = EVEOnlineProfile
15-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
13+
export default function EVEOnline<P extends EVEOnlineProfile>(
14+
options: OAuthUserConfig<P>
15+
): OAuthConfig<P> {
1616
return {
1717
id: "eveonline",
1818
name: "EVE Online",
@@ -27,7 +27,7 @@ export default function EVEOnline<
2727
idToken: true,
2828
profile(profile) {
2929
return {
30-
id: profile.CharacterID,
30+
id: String(profile.CharacterID),
3131
name: profile.CharacterName,
3232
email: null,
3333
image: `https://image.eveonline.com/Character/${profile.CharacterID}_128.jpg`,

‎packages/next-auth/src/providers/facebook.ts

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface FacebookProfile {
3+
interface FacebookPictureData {
4+
url: string
5+
}
6+
7+
interface FacebookPicture {
8+
data: FacebookPictureData
9+
}
10+
export interface FacebookProfile extends Record<string, any> {
411
id: string
5-
picture: { data: { url: string } }
12+
picture: FacebookPicture
613
}
714

8-
export default function Facebook<
9-
P extends Record<string, any> = FacebookProfile
10-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
15+
export default function Facebook<P extends FacebookProfile>(
16+
options: OAuthUserConfig<P>
17+
): OAuthConfig<P> {
1118
return {
1219
id: "facebook",
1320
name: "Facebook",

‎packages/next-auth/src/providers/fusionauth.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { OAuthConfig, OAuthUserConfig } from "./oauth"
33
/** This is the default openid signature returned from FusionAuth
44
* it can be customized using [lambda functions](https://fusionauth.io/docs/v1/tech/lambdas)
55
*/
6-
export interface FusionAuthProfile {
6+
export interface FusionAuthProfile extends Record<string, any> {
77
aud: string
88
exp: number
99
iat: number
@@ -20,9 +20,7 @@ export interface FusionAuthProfile {
2020
sid: string
2121
}
2222

23-
export default function FusionAuth<
24-
P extends Record<string, any> = FusionAuthProfile
25-
>(
23+
export default function FusionAuth<P extends FusionAuthProfile>(
2624
// tenantId only needed if there is more than one tenant configured on the server
2725
options: OAuthUserConfig<P> & { tenantId?: string }
2826
): OAuthConfig<P> {

‎packages/next-auth/src/providers/google.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface GoogleProfile {
3+
export interface GoogleProfile extends Record<string, any> {
44
aud: string
55
azp: string
66
email: string
@@ -18,7 +18,7 @@ export interface GoogleProfile {
1818
sub: string
1919
}
2020

21-
export default function Google<P extends Record<string, any> = GoogleProfile>(
21+
export default function Google<P extends GoogleProfile>(
2222
options: OAuthUserConfig<P>
2323
): OAuthConfig<P> {
2424
return {

‎packages/next-auth/src/providers/kakao.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type AgeRange =
1919
* https://developers.kakao.com/docs/latest/ko/kakaologin/rest-api#req-user-info
2020
* type from : https://gist.github.com/ziponia/cdce1ebd88f979b2a6f3f53416b56a77
2121
*/
22-
export interface KakaoProfile {
22+
export interface KakaoProfile extends Record<string, any> {
2323
id: number
2424
has_signed_up?: boolean
2525
connected_at?: DateTime
@@ -66,7 +66,7 @@ export interface KakaoProfile {
6666
}
6767
}
6868

69-
export default function Kakao<P extends Record<string, any> = KakaoProfile>(
69+
export default function Kakao<P extends KakaoProfile>(
7070
options: OAuthUserConfig<P>
7171
): OAuthConfig<P> {
7272
return {
@@ -81,7 +81,7 @@ export default function Kakao<P extends Record<string, any> = KakaoProfile>(
8181
},
8282
profile(profile) {
8383
return {
84-
id: profile.id,
84+
id: String(profile.id),
8585
name: profile.kakao_account?.profile?.nickname,
8686
email: profile.kakao_account?.email,
8787
image: profile.kakao_account?.profile?.profile_image_url,

‎packages/next-auth/src/providers/keycloak.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface KeycloakProfile {
3+
export interface KeycloakProfile extends Record<string, any> {
44
exp: number
55
iat: number
66
auth_time: number
@@ -24,9 +24,9 @@ export interface KeycloakProfile {
2424
user: any
2525
}
2626

27-
export default function Keycloak<
28-
P extends Record<string, any> = KeycloakProfile
29-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
27+
export default function Keycloak<P extends KeycloakProfile>(
28+
options: OAuthUserConfig<P>
29+
): OAuthConfig<P> {
3030
return {
3131
id: "keycloak",
3232
name: "Keycloak",

‎packages/next-auth/src/providers/line.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface LineProfile {
3+
export interface LineProfile extends Record<string, any> {
44
iss: string
55
sub: string
66
aud: string
@@ -12,7 +12,7 @@ export interface LineProfile {
1212
user: any
1313
}
1414

15-
export default function LINE<P extends Record<string, any> = LineProfile>(
15+
export default function LINE<P extends LineProfile>(
1616
options: OAuthUserConfig<P>
1717
): OAuthConfig<P> {
1818
return {

‎packages/next-auth/src/providers/linkedin.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface Element {
88
identifiers?: Identifier[]
99
}
1010

11-
export interface LinkedInProfile {
11+
export interface LinkedInProfile extends Record<string, any> {
1212
id: string
1313
localizedFirstName: string
1414
localizedLastName: string
@@ -19,9 +19,9 @@ export interface LinkedInProfile {
1919
}
2020
}
2121

22-
export default function LinkedIn<
23-
P extends Record<string, any> = LinkedInProfile
24-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
22+
export default function LinkedIn<P extends LinkedInProfile>(
23+
options: OAuthUserConfig<P>
24+
): OAuthConfig<P> {
2525
return {
2626
id: "linkedin",
2727
name: "LinkedIn",

‎packages/next-auth/src/providers/naver.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

33
/** https://developers.naver.com/docs/login/profile/profile.md */
4-
export interface NaverProfile {
4+
export interface NaverProfile extends Record<string, any> {
55
resultcode: string
66
message: string
77
response: {
@@ -18,7 +18,7 @@ export interface NaverProfile {
1818
}
1919
}
2020

21-
export default function Naver<P extends Record<string, any> = NaverProfile>(
21+
export default function Naver<P extends NaverProfile>(
2222
options: OAuthUserConfig<P>
2323
): OAuthConfig<P> {
2424
return {

‎packages/next-auth/src/providers/okta.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface OktaProfile {
3+
export interface OktaProfile extends Record<string, any> {
44
iss: string
55
ver: string
66
sub: string
@@ -34,7 +34,7 @@ export interface OktaProfile {
3434
c_hash: string
3535
}
3636

37-
export default function Okta<P extends Record<string, any> = OktaProfile>(
37+
export default function Okta<P extends OktaProfile>(
3838
options: OAuthUserConfig<P>
3939
): OAuthConfig<P> {
4040
return {

‎packages/next-auth/src/providers/osu.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export interface OsuUserCompact {
1616
username: string
1717
}
1818

19-
export interface OsuProfile extends OsuUserCompact {
19+
export interface OsuProfile extends OsuUserCompact, Record<string, any> {
2020
discord: string | null
2121
has_supported: boolean
2222
interests: string | null
@@ -49,7 +49,7 @@ export interface OsuProfile extends OsuUserCompact {
4949
is_restricted: boolean
5050
}
5151

52-
export default function Osu<P extends Record<string, any> = OsuProfile>(
52+
export default function Osu<P extends OsuProfile>(
5353
options: OAuthUserConfig<P>
5454
): OAuthConfig<P> {
5555
return {

‎packages/next-auth/src/providers/patreon.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface PatreonProfile {
3+
export interface PatreonProfile extends Record<string, any> {
44
sub: string
55
nickname: string
66
email: string
77
picture: string
88
}
99

10-
export default function Patreon<P extends Record<string, any> = PatreonProfile>(
10+
export default function Patreon<P extends PatreonProfile>(
1111
options: OAuthUserConfig<P>
1212
): OAuthConfig<P> {
1313
return {

‎packages/next-auth/src/providers/pipedrive.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface PipedriveProfile {
3+
export interface PipedriveProfile extends Record<string, any> {
44
success: boolean
55
data: {
66
id: number
@@ -35,9 +35,9 @@ export interface PipedriveProfile {
3535
}
3636
}
3737

38-
export default function Pipedrive<
39-
P extends Record<string, any> = PipedriveProfile
40-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
38+
export default function Pipedrive<P extends PipedriveProfile>(
39+
options: OAuthUserConfig<P>
40+
): OAuthConfig<P> {
4141
return {
4242
id: "pipedrive",
4343
name: "Pipedrive",
@@ -48,7 +48,7 @@ export default function Pipedrive<
4848
userinfo: "https://api.pipedrive.com/users/me",
4949
profile: ({ data: profile }) => {
5050
return {
51-
id: profile.id,
51+
id: String(profile.id),
5252
name: profile.name,
5353
email: profile.email,
5454
image: profile.icon_url,

‎packages/next-auth/src/providers/slack.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface SlackProfile {
3+
export interface SlackProfile extends Record<string, any> {
44
ok: boolean
55
sub: string
66
"https://slack.com/user_id": string
@@ -32,7 +32,7 @@ export interface SlackProfile {
3232
"https://slack.com/team_image_default": boolean
3333
}
3434

35-
export default function Slack<P extends Record<string, any> = SlackProfile>(
35+
export default function Slack<P extends SlackProfile>(
3636
options: OAuthUserConfig<P>
3737
): OAuthConfig<P> {
3838
return {

‎packages/next-auth/src/providers/spotify.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ export interface SpotifyImage {
44
url: string
55
}
66

7-
export interface SpotifyProfile {
7+
export interface SpotifyProfile extends Record<string, any> {
88
id: string
99
display_name: string
1010
email: string
1111
images: SpotifyImage[]
1212
}
13-
export default function Spotify<P extends Record<string, any> = SpotifyProfile>(
13+
export default function Spotify<P extends SpotifyProfile>(
1414
options: OAuthUserConfig<P>
1515
): OAuthConfig<P> {
1616
return {

‎packages/next-auth/src/providers/trakt.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface TraktUser {
3+
export interface TraktUser extends Record<string, any> {
44
username: string
55
private: boolean
66
name: string
@@ -15,9 +15,9 @@ export interface TraktUser {
1515
images: { avatar: { full: string } }
1616
}
1717

18-
export default function Trakt<
19-
P extends Record<string, any> = TraktUser
20-
>(options: OAuthUserConfig<P>): OAuthConfig<P> {
18+
export default function Trakt<P extends TraktUser>(
19+
options: OAuthUserConfig<P>
20+
): OAuthConfig<P> {
2121
return {
2222
id: "trakt",
2323
name: "Trakt",

‎packages/next-auth/src/providers/twitch.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface TwitchProfile {
3+
export interface TwitchProfile extends Record<string, any> {
44
sub: string
55
preferred_username: string
66
email: string
77
picture: string
88
}
99

10-
export default function Twitch<P extends Record<string, any> = TwitchProfile>(
10+
export default function Twitch<P extends TwitchProfile>(
1111
options: OAuthUserConfig<P>
1212
): OAuthConfig<P> {
1313
return {

‎packages/next-auth/src/providers/workos.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface WorkOSProfile {
3+
export interface WorkOSProfile extends Record<string, any> {
44
object: string
55
id: string
66
organization_id: string
@@ -15,10 +15,11 @@ export interface WorkOSProfile {
1515
email: string
1616
lastName: string
1717
firstName: string
18+
picture: string
1819
}
1920
}
2021

21-
export default function WorkOS<P extends Record<string, any> = WorkOSProfile>(
22+
export default function WorkOS<P extends WorkOSProfile>(
2223
options: OAuthUserConfig<P>
2324
): OAuthConfig<P> {
2425
const { issuer = "https://api.workos.com/" } = options

‎packages/next-auth/src/providers/zoom.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { OAuthConfig, OAuthUserConfig } from "."
22

3-
export interface ZoomProfile {
3+
export interface ZoomProfile extends Record<string, any> {
44
id: string
55
first_name: string
66
last_name: string
@@ -29,7 +29,7 @@ export interface ZoomProfile {
2929
status: string
3030
}
3131

32-
export default function Zoom<P extends Record<string, any> = ZoomProfile>(
32+
export default function Zoom<P extends ZoomProfile>(
3333
options: OAuthUserConfig<P>
3434
): OAuthConfig<P> {
3535
return {

0 commit comments

Comments
 (0)
Please sign in to comment.