diff --git a/cp/app/Controllers/Auth/AuthController.php b/cp/app/Controllers/Auth/AuthController.php
index d49978f..0356f17 100644
--- a/cp/app/Controllers/Auth/AuthController.php
+++ b/cp/app/Controllers/Auth/AuthController.php
@@ -15,68 +15,6 @@ use Psr\Http\Message\ServerRequestInterface as Request;
*/
class AuthController extends Controller
{
- /**
- * @param Request $request
- * @param Response $response
- * @return mixed
- * @throws \DI\DependencyException
- * @throws \DI\NotFoundException
- */
- public function createRegister(Request $request, Response $response){
- return view($response,'auth/register.twig');
- }
-
- /**
- * @param Request $request
- * @param Response $response
- * @return Response
- * @throws \DI\DependencyException
- * @throws \DI\NotFoundException
- * @throws \Pinga\Auth\AuthError
- */
- public function register(Request $request, Response $response){
-
- $validation = $this->validator->validate($request, [
- 'email' => v::noWhitespace()->notEmpty()->email(),
- 'username' => v::noWhitespace()->notEmpty()->alnum(),
- 'password' => v::notEmpty()->stringType()->length(8),
- ]);
-
- if ($validation->failed()) {
- redirect()->route('register');
- //or
- //return $response->withHeader('Location', route('register'));
- }
- $data = $request->getParsedBody();
- $auth =Auth::create($data['email'],$data['password'],$data['username']);
- if($auth) {
- $msg = 'Resend email ';
- flash('success', 'We have send you a verification link to '.$data['email'].' '.$msg);
- return $response->withHeader('Location', route('login'));
- }
-
- }
-
- /**
- * @param Request $request
- * @param Response $response
- */
- public function verifyEmailResend(Request $request, Response $response){
- $data = $request->getQueryParams();
- Auth::ResendVerification($data['email']);
- }
-
- /**
- * @param Request $request
- * @param Response $response
- * @throws \Pinga\Auth\AuthError
- */
- public function verifyEmail(Request $request, Response $response){
- //confirm email
- $data = $request->getQueryParams();
- Auth::verifyEmail($data['selector'], $data['token']);
- }
-
/**
* @param Request $request
* @param Response $response
diff --git a/cp/resources/views/admin/profile/profile.twig b/cp/resources/views/admin/profile/profile.twig
index 1371f5e..be073c1 100644
--- a/cp/resources/views/admin/profile/profile.twig
+++ b/cp/resources/views/admin/profile/profile.twig
@@ -117,7 +117,7 @@
Verification Code
-
+
Enter the code generated by your authentication app. This code verifies that your 2FA setup is working correctly. Once entered, click 'Save 2FA Settings' to activate two-factor authentication for your account.
diff --git a/cp/resources/views/auth/login.twig b/cp/resources/views/auth/login.twig
index 1c7bded..4d1b163 100644
--- a/cp/resources/views/auth/login.twig
+++ b/cp/resources/views/auth/login.twig
@@ -18,7 +18,7 @@
Email address
-
+
Password
@@ -33,6 +33,10 @@
+
+ 2FA Code
+
+
@@ -44,29 +48,35 @@
-
-
- Don't have account yet?
Sign up
+
or
+
-
-{% endblock %}
+ togglePasswordBtn.addEventListener('click', function() {
+ const type = passwordInput.getAttribute('type') === 'password' ? 'text' : 'password';
+ passwordInput.setAttribute('type', type);
+
+ const svg = togglePasswordBtn.querySelector('svg');
+ const title = togglePasswordBtn.getAttribute('title');
+
+ if (type === 'text') {
+ svg.innerHTML = ' ';
+ togglePasswordBtn.setAttribute('title', 'Hide password');
+ } else {
+ svg.innerHTML = ' ';
+ togglePasswordBtn.setAttribute('title', 'Show password');
+ }
+ });
+
+{% endblock %}
\ No newline at end of file
diff --git a/cp/resources/views/auth/mail/confirm-email.html b/cp/resources/views/auth/mail/confirm-email.html
deleted file mode 100644
index 5706ea2..0000000
--- a/cp/resources/views/auth/mail/confirm-email.html
+++ /dev/null
@@ -1,236 +0,0 @@
-
-
-
- Confirm Email
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Please confirm your email
-
-
-
-
-
-
-
-
- Follow the link bellow to verify your email address to start using
-
- {app_name}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Or verify using this link:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cp/resources/views/auth/mail/verification.html b/cp/resources/views/auth/mail/verification.html
deleted file mode 100644
index 904524d..0000000
--- a/cp/resources/views/auth/mail/verification.html
+++ /dev/null
@@ -1,216 +0,0 @@
-
-
- Alsco Forms
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Email verification
- Follow the link bellow to verify your email address:
- Click Verify email
- Or copy the link to your browser: {link}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/cp/resources/views/auth/mail/welcome.html b/cp/resources/views/auth/mail/welcome.html
deleted file mode 100644
index 31ca656..0000000
--- a/cp/resources/views/auth/mail/welcome.html
+++ /dev/null
@@ -1,348 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Welcome to {{Product}}
-
-
-
-
-
-
-
-
-
- Hello {{ name }}!
- Thank you for signing up for {{ product }}. We're really happy to have you! Click the link below to login to your account:
-
-
-
-
-
-
-
-
-
-
-
-
- Login to Your Account
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Some Firm Ltd, 35 Avenue. City 10115, USA
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/cp/resources/views/auth/register.twig b/cp/resources/views/auth/register.twig
deleted file mode 100644
index 0f07dfa..0000000
--- a/cp/resources/views/auth/register.twig
+++ /dev/null
@@ -1,60 +0,0 @@
-{% extends "layouts/auth.twig" %}
-
-{% block title %}Sign Up{% endblock %}
-
-{% block content %}
-
-
-
-
- {% include 'partials/flash.twig' %}
-
-
-
- Already have account?
Sign in
-
-
-
-{% endblock %}
diff --git a/cp/routes/web.php b/cp/routes/web.php
index f352d03..81b71cc 100644
--- a/cp/routes/web.php
+++ b/cp/routes/web.php
@@ -24,14 +24,8 @@ use Tqdev\PhpCrudApi\Config\Config;
$app->get('/', HomeController::class .':index')->setName('index');
$app->group('', function ($route) {
- $route->get('/register', AuthController::class . ':createRegister')->setName('register');
- $route->post('/register', AuthController::class . ':register');
$route->get('/login', AuthController::class . ':createLogin')->setName('login');
$route->post('/login', AuthController::class . ':login');
-
- $route->get('/verify-email', AuthController::class.':verifyEmail')->setName('verify.email');
- $route->get('/verify-email-resend',AuthController::class.':verifyEmailResend')->setName('verify.email.resend');
-
$route->get('/forgot-password', PasswordController::class . ':createForgotPassword')->setName('forgot.password');
$route->post('/forgot-password', PasswordController::class . ':forgotPassword');
$route->get('/reset-password', PasswordController::class.':resetPassword')->setName('reset.password');