OptionalaccessCredentials that can be used by an application to access an API.
OptionalcustomPerforms a token exchange (RFC 8693) using the token endpoint.
app.get('/api', requiresAuth(), async (req, res) => {
const tokenSet = await req.oidc.customTokenExchange({
audience: 'https://downstream-api.example.com',
});
res.json({ access_token: tokenSet.access_token });
});
Errors thrown:
subject_token could not be
resolved (no session or no access token). err.error contains the OAuth error codeerr.error === 'mfa_required'Vendor-specific parameters must be passed via extra.
OptionalidThe OpenID Connect ID Token.
OptionalidAn object containing all the claims of the ID Token.
Method to check the user's authenticated state, returns true if logged in.
OptionalrefreshCredentials that can be used to refresh an access token.
OptionaluserAn object containing all the claims of the ID Token with the claims specified in identityClaimFilter removed.
The request authentication context found on the Express request when OpenID Connect auth middleware is added to your application.