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(...);}); Copy
const { claimCheck } = require('express-openid-connect');app.get('/admin/community', claimCheck((req, claims) => { return claims.isAdmin && claims.roles.includes('community');}), (req, res) => { res.send(...);});
Use this MW to protect a route, providing a custom function to check.