Skip to content

Commit 206bfac

Browse files
committed
fix(oauth): Fix OAuth authorization update
1 parent 9b90f7c commit 206bfac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dev": "webpack-dev-server --hot",
88
"test": "jest",
99
"typecheck": "flow",
10-
"postinstall": "flow-typed install -s -o"
10+
"install:types": "flow-typed install -s -o"
1111
},
1212
"repository": {
1313
"type": "git",

server/src/oauth/routes/methods/authorize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = function authorize(req, res) {
3434
}
3535

3636
return Authorization.findByIdAndUpdate(authorization._id, {
37-
$set: { allowedScopes: scopes },
37+
$set: { allowedScopes: [...authorization.allowedScopes, ...scopes] },
3838
}).then(() => [application, scopes]);
3939
})
4040
.then(([application, scopes]) => {

0 commit comments

Comments
 (0)