• Use this MW to protect a route, providing a custom function to check.

    const { claimCheck } = require('express-openid-connect');

    app.get('/admin/community', claimCheck((req, claims) => {
    return claims.isAdmin && claims.roles.includes('community');
    }), (req, res) => {
    res.send(...);
    });

    Parameters

    • checkFn: ((req, claims) => boolean)
        • (req, claims): boolean
        • Parameters

          Returns boolean

    Returns RequestHandler