Optional
accessCredentials that can be used by an application to access an API.
Optional
idThe OpenID Connect ID Token.
Optional
idAn object containing all the claims of the ID Token.
Method to check the user's authenticated state, returns true
if logged in.
Optional
refreshCredentials that can be used to refresh an access token.
Optional
userAn 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.