Options
All
  • Public
  • Public/Protected
  • All
Menu

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' })
})

Hierarchy

  • ResponseContext

Index

Properties

Properties

login

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',
    }
  });
});

Type declaration

logout

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' })
});

Type declaration