diff --git a/types/next-auth/index.d.ts b/types/next-auth/index.d.ts index a162d83d1f..62b749c1fb 100644 --- a/types/next-auth/index.d.ts +++ b/types/next-auth/index.d.ts @@ -96,6 +96,7 @@ interface Session { interface JWTOptions { secret?: string; maxAge?: number; + encryption?: boolean; encode?(options: JWTEncodeParams): Promise; decode?(options: JWTDecodeParams): Promise; } diff --git a/types/next-auth/next-auth-tests.ts b/types/next-auth/next-auth-tests.ts index 0e99965661..9cc127b3e2 100644 --- a/types/next-auth/next-auth-tests.ts +++ b/types/next-auth/next-auth-tests.ts @@ -69,6 +69,7 @@ const allConfig = { jwt: { secret: 'secret-thing', maxAge: 365, + encryption: true, encode: () => Promise.resolve('foo'), decode: () => Promise.resolve('foo'), }, @@ -328,6 +329,13 @@ Providers.Google({ clientSecret: 'bar123', }); +// $ExpectType GenericReturnConfig +Providers.Google({ + clientId: 'foo123', + clientSecret: 'bar123', + authorizationUrl: 'https://foo.google.com', +}); + // $ExpectType GenericReturnConfig Providers.Auth0({ clientId: 'foo123', diff --git a/types/next-auth/providers.d.ts b/types/next-auth/providers.d.ts index 5176808b9e..b82b75afae 100644 --- a/types/next-auth/providers.d.ts +++ b/types/next-auth/providers.d.ts @@ -153,6 +153,7 @@ type Google = (options: ProviderGoogleOptions) => GenericReturnConfig; interface ProviderGoogleOptions { clientId: string; clientSecret: string; + authorizationUrl?: string; } /**