express-openid-connect
    Preparing search index...

    Interface ResponseContext

    The response authentication context found on the Express response when OpenID Connect auth middleware is added to your application.

    app.use(auth());

    app.get('/admin-login', (req, res) => {
    res.oidc.login({ returnTo: '/admin' })
    })
    interface ResponseContext {
        callback: (opts?: CallbackOptions) => Promise<void>;
        login: (opts?: LoginOptions) => Promise<void>;
        logout: (opts?: LogoutOptions) => Promise<void>;
    }
    Index

    Properties

    Properties

    callback: (opts?: CallbackOptions) => Promise<void>

    Provided by default via the /callback route. Call this to override or have other callback routes with

    app.get('/callback', (req, res) => {
    res.oidc.callback({ redirectUri: 'https://example.com/callback' });
    });
    login: (opts?: LoginOptions) => Promise<void>

    Provided by default via the /login route. Call this to override or have other login routes with custom authorizationParams or returnTo

    app.get('/admin-login', (req, res) => {
    res.oidc.login({
    returnTo: '/admin',
    authorizationParams: {
    scope: 'openid profile email admin:user',
    }
    });
    });
    logout: (opts?: LogoutOptions) => Promise<void>

    Provided by default via the /logout route. Call this to override or have other logout routes with custom returnTo

    app.get('/admin-logout', (req, res) => {
    res.oidc.logout({ returnTo: '/admin-welcome' })
    });