How to use the passport-oauth2.TokenError function in passport-oauth2

To help you get started, we’ve selected a few passport-oauth2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DefinitelyTyped / DefinitelyTyped / types / passport-oauth2 / passport-oauth2-tests.ts View on Github external
const strategyOptions2: StrategyOptionsWithRequest = {
    authorizationURL: '',
    callbackURL: '',
    clientID: 'dummy',
    clientSecret: 'secret',
    tokenURL: '',
    passReqToCallback: true

const strategy3: PassportStrategy = new OAuth2Strategy(strategyOptions2, verifyFunction3);

const strategy4: Strategy = new Strategy(strategyOptions2, verifyFunction4);

const err1 = new AuthorizationError('Description', 'invalid_request', undefined);

const err2 = new TokenError(undefined, 'invalid_request', undefined);

const err3 = new InternalOAuthError('Hello', {});


OAuth 2.0 authentication strategy for Passport.

Latest version published 3 months ago

Package Health Score

73 / 100
Full package analysis