diff --git a/public/static/js/account/account.js b/public/static/js/account/account.js index d0bc3f6..f78622a 100644 --- a/public/static/js/account/account.js +++ b/public/static/js/account/account.js @@ -3,7 +3,7 @@ var Account = { countdown: null, openGoogleAuthenticate: function () { - window.open('/account/googleAuthenticate', 'googleAuthenticate', 'height=600,width=600') + window.open(googleAuthenticateUrl, 'googleAuthenticate', 'height=600,width=600') }, authenticatedWithGoogleCallback: function (authenticatedWithGoogleUntil) { diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index 7a83d8c..346822e 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -37,7 +37,7 @@ class LoginController $this->userPasswordResetterRepository = new UserPasswordResetterRepository(); $this->redirectUrl = $this->request->session()->has('redirect_after_login') ? $this->request->session()->get('redirect_after_login') : - \Container::$routeCollection->getRoute('index')->generateLink(); + \Container::$routeCollection->getRoute('home')->generateLink(); } public function getLoginForm() @@ -113,8 +113,8 @@ class LoginController if ($user === null || !$user->checkPassword($this->request->post('password'))) { return new JsonContent([ 'error' => [ - 'errorText' => 'No user found with the given email address / username or the given password is wrong. You can request password reset!' + 'errorText' => 'No user found with the given email address / username or the given password is wrong. You can request password reset!' ] ]); } @@ -127,7 +127,7 @@ class LoginController public function loginWithGoogle() { - $defaultError = 'Authentication with Google failed. Please try again!'; + $defaultError = 'Authentication with Google failed. Please try again!'; if ($this->request->user() !== null) { $this->deleteRedirectUrl(); @@ -174,7 +174,7 @@ class LoginController { $this->request->setUser(null); - return new Redirect(\Container::$routeCollection->getRoute('index')->generateLink(), IRedirect::TEMPORARY); + return new Redirect(\Container::$routeCollection->getRoute('home')->generateLink(), IRedirect::TEMPORARY); } public function requestPasswordReset(): IContent diff --git a/src/Controller/OAuthController.php b/src/Controller/OAuthController.php index 0156209..9b771f9 100644 --- a/src/Controller/OAuthController.php +++ b/src/Controller/OAuthController.php @@ -110,10 +110,10 @@ class OAuthController { return new JsonContent([ 'issuer' => $_ENV['APP_URL'], - 'authorization_endpoint' => $this->request->getBase() . '/oauth/auth', - 'token_endpoint' => $this->request->getBase() . '/oauth/token', - 'userinfo_endpoint' => $this->request->getBase() . '/oauth/userinfo', - 'jwks_uri' => $this->request->getBase() . '/oauth/certs', + 'authorization_endpoint' => $this->request->getBase() . '/' . \Container::$routeCollection->getRoute('oauth-auth')->generateLink(), + 'token_endpoint' => $this->request->getBase() . '/' . \Container::$routeCollection->getRoute('oauth-token')->generateLink(), + 'userinfo_endpoint' => $this->request->getBase() . '/' . \Container::$routeCollection->getRoute('oauth-userinfo')->generateLink(), + 'jwks_uri' => $this->request->getBase() . '/' . \Container::$routeCollection->getRoute('oauth-certs')->generateLink(), 'response_types_supported' => [ 'code', diff --git a/views/account/account.php b/views/account/account.php index b24e73d..27e6dcc 100644 --- a/views/account/account.php +++ b/views/account/account.php @@ -5,7 +5,7 @@ @section(main)