(auth-backend) Bugfix: Do not throw Exception if scopes dont exist. Refs #1786
Currently, the OAuthProvider library in `auth-backend` throws an Exception if scopes are missing in the `start` (initial) request in the Authorization flow. Scopes are an optional parameter as per the spec, so if scopes are empty, simply forward the empty scopes instead of throwing an Exception
This commit is contained in:
@@ -104,10 +104,6 @@ export class OAuthProvider implements AuthProviderRouteHandlers {
|
||||
// retrieve scopes from request
|
||||
const scope = req.query.scope?.toString() ?? '';
|
||||
|
||||
if (!scope) {
|
||||
throw new InputError('missing scope parameter');
|
||||
}
|
||||
|
||||
if (this.options.persistScopes) {
|
||||
this.setScopesCookie(res, scope);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user