diff --git a/js/dist/forum.js b/js/dist/forum.js index 4ee4e8b..319120c 100644 Binary files a/js/dist/forum.js and b/js/dist/forum.js differ diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index e7f62ed..faae632 100644 Binary files a/js/dist/forum.js.map and b/js/dist/forum.js.map differ diff --git a/js/src/forum/components/oauth/AuthorizePage.js b/js/src/forum/components/oauth/AuthorizePage.js index ec1e0a5..02a757d 100644 --- a/js/src/forum/components/oauth/AuthorizePage.js +++ b/js/src/forum/components/oauth/AuthorizePage.js @@ -14,6 +14,7 @@ export default class AuthorizePage extends IndexPage { client_scope = []; loading = true; is_authorized = false; + submit_loading = false; oninit(vnode) { super.oninit(vnode); @@ -76,7 +77,7 @@ export default class AuthorizePage extends IndexPage { scopes_temp = scopes_temp.concat(default_scopes); this.client_scope = scopes_temp.filter((scope, index) => scopes_temp.indexOf(scope) === index); - console.log( this.client_scope ); + console.log(this.client_scope); this.loading = false; m.redraw(); }); @@ -135,9 +136,9 @@ export default class AuthorizePage extends IndexPage {
{ (scope_info.scope_icon().indexOf('fa-') > -1) ? - : - + : + }
@@ -158,7 +159,7 @@ export default class AuthorizePage extends IndexPage { }
-{/* + {/* @@ -166,14 +167,12 @@ export default class AuthorizePage extends IndexPage { */}
- -
@@ -187,6 +186,12 @@ export default class AuthorizePage extends IndexPage { ); } + deny(e) { + this.is_authorized = false; + } + agree(e) { + this.is_authorized = true; + } onsubmit(e) { e.preventDefault(); diff --git a/src/Controllers/AuthorizeController.php b/src/Controllers/AuthorizeController.php index c1a8f6a..325b614 100644 --- a/src/Controllers/AuthorizeController.php +++ b/src/Controllers/AuthorizeController.php @@ -45,7 +45,7 @@ class AuthorizeController implements RequestHandlerInterface return new JsonResponse(json_decode($response->getResponseBody(), true)); } - $is_authorized = (Arr::get($params, 'authorized', 'no') === 'yes'); + $is_authorized = Arr::get($params, 'is_authorized', 0); $server->handleAuthorizeRequest($request, $response, $is_authorized, $actor->id); if ($is_authorized) { // this is only here so that you get to see your code in the cURL request. Otherwise, we'd redirect back to the client