File tree 2 files changed +4
-4
lines changed
packages/endpoint-auth/lib
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,13 @@ export const consentController = {
27
27
authType,
28
28
me,
29
29
redirect_uri,
30
- scopeItems : getScopeItems ( scope , response ) ,
30
+ scopeItems : scope && getScopeItems ( scope , response ) ,
31
31
} ) ;
32
32
} else {
33
33
response . redirect ( request . baseUrl + "/new-password?setup=true" ) ;
34
34
}
35
- } catch {
35
+ } catch ( error ) {
36
+ console . error ( "ERROR" , error ) ;
36
37
throw IndiekitError . badRequest (
37
38
response . locals . __ ( "BadRequestError.invalidValue" , "request_uri" ) ,
38
39
) ;
Original file line number Diff line number Diff line change @@ -28,8 +28,7 @@ export const supportedScopes = Object.entries(scopes)
28
28
*/
29
29
export function getScopeItems ( scope , response ) {
30
30
const localisedScopes = Object . keys ( scopes ) ;
31
- let requestedScopes = scope || [ ] ;
32
- requestedScopes = typeof scope === "string" ? scope . split ( " " ) : scope ;
31
+ const requestedScopes = typeof scope === "string" ? scope . split ( " " ) : scope ;
33
32
34
33
return requestedScopes . map ( ( value ) => ( {
35
34
label : localisedScopes . includes ( value )
You can’t perform that action at this time.
0 commit comments