Function scopeIncludesAny

  • Check a token's scope claim to include any of the given scopes, raises a 403 insufficient_scope error if the value of the scope claim does not include any of the given scopes.

    app.use(auth());

    app.get('/admin/edit', scopeIncludesAny('read:msg read:admin'),
    (req, res) => { ... });

    Parameters

    • scopes: string | string[]

    Returns Handler