diff --git a/src/Controller/LoginController.php b/src/Controller/LoginController.php index cca513f..4eaa2be 100644 --- a/src/Controller/LoginController.php +++ b/src/Controller/LoginController.php @@ -53,7 +53,7 @@ class LoginController $oAuth = new GoogleOAuth(new Request()); $url = $oAuth->getDialogUrl( $state, - \Container::$request->getBase() . \Container::$routeCollection->getRoute('login-google-action')->generateLink(), + \Container::$request->getBase() . \Container::$routeCollection->getRoute('login.google-action')->generateLink(), $nonce ); @@ -106,7 +106,7 @@ class LoginController 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!' + \Container::$routeCollection->getRoute('password.requestReset')->generateLink(['email' => \Container::$request->post('email')]) . '" title="Request password reset">request password reset!' ] ]); } @@ -119,7 +119,7 @@ class LoginController public function loginWithGoogle() { - $defaultError = 'Authentication with Google failed. Please try again!'; + $defaultError = 'Authentication with Google failed. Please try again!'; if (\Container::$request->user() !== null) { $this->deleteRedirectUrl(); @@ -133,7 +133,7 @@ class LoginController $oAuth = new GoogleOAuth(new Request()); $tokenData = $oAuth->getToken( \Container::$request->query('code'), - \Container::$request->getBase() . \Container::$routeCollection->getRoute('login-google-action')->generateLink() + \Container::$request->getBase() . \Container::$routeCollection->getRoute('login.google-action')->generateLink() ); if (!isset($tokenData['id_token'])) { @@ -246,7 +246,7 @@ class LoginController if ($resetter === null || $resetter->getExpiresDate() < new DateTime()) { return new JsonContent([ 'redirect' => [ - 'target' => \Container::$routeCollection->getRoute('password-reset')->generateLink(['token' => $token]) + 'target' => \Container::$routeCollection->getRoute('password.reset')->generateLink(['token' => $token]) ] ]); } @@ -281,10 +281,10 @@ class LoginController $mail = new Mail(); $mail->addRecipient($email); $mail->setSubject($_ENV['APP_NAME'] . ' - Password reset'); - $mail->setBodyFromTemplate('password-reset', [ + $mail->setBodyFromTemplate('password.reset', [ 'EMAIL' => $email, 'RESET_LINK' => \Container::$request->getBase() . - \Container::$routeCollection->getRoute('password-reset')->generateLink(['token' => $token]), + \Container::$routeCollection->getRoute('password.reset')->generateLink(['token' => $token]), 'EXPIRES' => $expires->format('Y-m-d H:i T') ]); $mail->send(); diff --git a/src/Controller/OAuthController.php b/src/Controller/OAuthController.php index ee41154..48b318e 100644 --- a/src/Controller/OAuthController.php +++ b/src/Controller/OAuthController.php @@ -104,10 +104,10 @@ class OAuthController { return new JsonContent([ 'issuer' => $_ENV['APP_URL'], - 'authorization_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth-auth')->generateLink(), - 'token_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth-token')->generateLink(), - 'userinfo_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth-userinfo')->generateLink(), - 'jwks_uri' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth-certs')->generateLink(), + 'authorization_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth.auth')->generateLink(), + 'token_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth.token')->generateLink(), + 'userinfo_endpoint' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth.userinfo')->generateLink(), + 'jwks_uri' => \Container::$request->getBase() . \Container::$routeCollection->getRoute('oauth.certs')->generateLink(), 'response_types_supported' => [ 'code', diff --git a/views/communities/community.php b/views/communities/community.php index 13ce2dc..8055113 100644 --- a/views/communities/community.php +++ b/views/communities/community.php @@ -4,7 +4,7 @@