diff --git a/types/passport-auth0/index.d.ts b/types/passport-auth0/index.d.ts index 5bcfced19c..fb71a215b4 100644 --- a/types/passport-auth0/index.d.ts +++ b/types/passport-auth0/index.d.ts @@ -1,6 +1,7 @@ // Type definitions for passport-auth0 1.0 // Project: https://github.com/auth0/passport-auth0 // Definitions by: John Umeh +// Vishnu Sankar // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -31,7 +32,7 @@ export interface StrategyOption { clientID: string; clientSecret: string; callbackURL: string; - + domain: string; scopeSeparator?: string; enableProof?: boolean; profileFields?: string[]; diff --git a/types/passport-auth0/passport-auth0-tests.ts b/types/passport-auth0/passport-auth0-tests.ts index 76e7ca85a0..5f3437106a 100644 --- a/types/passport-auth0/passport-auth0-tests.ts +++ b/types/passport-auth0/passport-auth0-tests.ts @@ -15,7 +15,8 @@ const User = { passport.use(new auth0.Strategy({ clientID: process.env.PASSPORT_AUTH0_CLIENT_ID as string, clientSecret: process.env.PASSPORT_AUTH0_CLIENT_SECRET as string, - callbackURL: process.env.PASSPORT_AUTH0_CALLBACK_URL as string + callbackURL: process.env.PASSPORT_AUTH0_CALLBACK_URL as string, + domain : process.env.PASSPORT_AUTH0_DOMAIN as string }, (accessToken: string, refreshToken: string, extraParams: auth0.ExtraVerificationParams, profile: auth0.Profile, done: (error: any, user?: any) => void) => { User.findOrCreate(profile.id, profile.provider, (err, user) => { @@ -29,6 +30,7 @@ passport.use(new auth0.Strategy({ clientID: process.env.PASSPORT_AUTH0_CLIENT_ID as string, clientSecret: process.env.PASSPORT_AUTH0_CLIENT_SECRET as string, callbackURL: process.env.PASSPORT_AUTH0_CALLBACK_URL as string, + domain : process.env.PASSPORT_AUTH0_DOMAIN as string, passReqToCallback: true }, (req: express.Request, accessToken: string, refreshToken: string, profile: auth0.Profile, done: (error: any, user?: any) => void) => { @@ -42,7 +44,8 @@ passport.use(new auth0.Strategy({ passport.use(new auth0.Strategy({ clientID: process.env.PASSPORT_AUTH0_CLIENT_ID as string, clientSecret: process.env.PASSPORT_AUTH0_CLIENT_SECRET as string, - callbackURL: process.env.PASSPORT_AUTH0_CALLBACK_URL as string + callbackURL: process.env.PASSPORT_AUTH0_CALLBACK_URL as string, + domain : process.env.PASSPORT_AUTH0_DOMAIN as string }, (accessToken: string, refreshToken: string, extraParams: auth0.ExtraVerificationParams, profile: auth0.Profile, done: (error: any, user?: any, info?: any) => void) => { done(null, false, { message: 'Some error.' });