mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
extending Profile interface and changing VerifyCallback (#36612)
* extending Profile interface and changing VerifyCallback * VerifyCallback error string | Error
This commit is contained in:
parent
9b5c4c8179
commit
77f516d94f
10
types/passport-google-oauth20/index.d.ts
vendored
10
types/passport-google-oauth20/index.d.ts
vendored
@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jaredhanson/passport-google-oauth2
|
||||
// Definitions by: Yasunori Ohoka <https://github.com/yasupeke>
|
||||
// Eduard Zintz <https://github.com/ezintz>
|
||||
// Tan Nguyen <https://github.com/ngtan>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
@ -36,8 +37,13 @@ export interface StrategyOptionsWithRequest extends _StrategyOptionsBase {
|
||||
|
||||
export interface Profile extends passport.Profile {
|
||||
profileUrl: string;
|
||||
|
||||
_raw: string;
|
||||
_json: any;
|
||||
}
|
||||
|
||||
export type VerifyCallback = (err?: string | Error, user?: any, info?: any) => void;
|
||||
|
||||
export class Strategy extends oauth2.Strategy {
|
||||
constructor(
|
||||
options: StrategyOptions,
|
||||
@ -45,7 +51,7 @@ export class Strategy extends oauth2.Strategy {
|
||||
accessToken: string,
|
||||
refreshToken: string,
|
||||
profile: Profile,
|
||||
done: oauth2.VerifyCallback
|
||||
done: VerifyCallback
|
||||
) => void
|
||||
);
|
||||
constructor(
|
||||
@ -55,7 +61,7 @@ export class Strategy extends oauth2.Strategy {
|
||||
accessToken: string,
|
||||
refreshToken: string,
|
||||
profile: Profile,
|
||||
done: oauth2.VerifyCallback
|
||||
done: VerifyCallback
|
||||
) => void
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user