mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #47868 [next-auth] add types for encryption? and authorizationUrl? by @opes
This commit is contained in:
parent
218b25b2f8
commit
1cfbfa269b
1
types/next-auth/index.d.ts
vendored
1
types/next-auth/index.d.ts
vendored
@ -96,6 +96,7 @@ interface Session {
|
||||
interface JWTOptions {
|
||||
secret?: string;
|
||||
maxAge?: number;
|
||||
encryption?: boolean;
|
||||
encode?(options: JWTEncodeParams): Promise<string>;
|
||||
decode?(options: JWTDecodeParams): Promise<string>;
|
||||
}
|
||||
|
||||
@ -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',
|
||||
|
||||
1
types/next-auth/providers.d.ts
vendored
1
types/next-auth/providers.d.ts
vendored
@ -153,6 +153,7 @@ type Google = (options: ProviderGoogleOptions) => GenericReturnConfig;
|
||||
interface ProviderGoogleOptions {
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
authorizationUrl?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user