Credentials that can be used by an application to access an API.
The OpenID Connect ID Token.
An object containing all the claims of the ID Token.
Method to check the user's authenticated state, returns true
if logged in.
Credentials that can be used to refresh an access token.
An object containing all the claims of the ID Token with the claims specified in identityClaimFilter removed.
Fetches the OIDC userinfo response.
app.use(auth());
app.get('/user-info', async (req, res) => {
const userInfo = await req.oidc.fetchUserInfo();
res.json(userInfo);
})
The request authentication context found on the Express request when OpenID Connect auth middleware is added to your application.
app.use(auth()); app.get('/profile', (req, res) => { const user = req.oidc.user; ... })