Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

init forgot password

Andras Bacsaicd625ba1e158
diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php
index 2a8a22d18d..570219cf52 100644
--- a/app/Providers/FortifyServiceProvider.php
+++ b/app/Providers/FortifyServiceProvider.php
@@ -55,6 +55,9 @@ class FortifyServiceProvider extends ServiceProvider
return $user;
}
});
+ Fortify::requestPasswordResetLinkView(function () {
+ return view('auth.forgot-password');
+ });
Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
diff --git a/lang/en.json b/lang/en.json
index c3fb7e03e4..3816ace194 100644
--- a/lang/en.json
+++ b/lang/en.json
@@ -4,7 +4,7 @@
"auth.register-now": "Register now!",
"auth.logout": "Logout",
"auth.register": "Register",
- "auth.registration_disabled": "Registration is disabled.",
+ "auth.registration_disabled": "Registration is disabled. Please contact the administrator.",
"auth.reset_password": "Reset Password",
"auth.failed": "These credentials do not match our records.",
"auth.failed.password": "The provided password is incorrect.",
diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php
new file mode 100644
index 0000000000..b4a63f5067
--- /dev/null
+++ b/resources/views/auth/forgot-password.blade.php
@@ -0,0 +1,50 @@
+<x-layout-simple>
+ Forgot Password
+ <form>
+ @csrf
+ <x-forms.input required value="[email protected]" type="email" name="email" label="{{ __('input.email') }}"
+ autofocus />
+ </form>
+ @if (session('status'))
+ <div class="mb-4 text-sm font-medium text-green-600">
+ {{ session('status') }}
+ </div>
+ @endif
+ {{-- <div class="flex items-center justify-center h-screen">
+ <div>
+ <div class="pb-8 text-5xl font-bold tracking-tight text-center text-white">Coolify</div>
+ <div class="flex items-center gap-2">
+ <h1 class="pb-0">{{ __('auth.login') }}</h1>
+ @if ($is_registration_enabled)
+ <a href="/register" class="flex justify-center pt-2 hover:no-underline">
+ <button
+ class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.register-now') }}</button>
+ </a>
+ @endif
+ </div>
+ <div class="w-96">
+ <form action="/login" method="POST" class="flex flex-col gap-2">
+ @csrf
+ @env('local')
+ <x-forms.input required value="[email protected]" type="email" name="email"
+ label="{{ __('input.email') }}" autofocus />
+ <x-forms.input required value="password" type="password" name="password"
+ label="{{ __('input.password') }}" />
+ @else
+ <x-forms.input required type="email" name="email" label="{{ __('input.email') }}" autofocus />
+ <x-forms.input required type="password" name="password" label="{{ __('input.password') }}" />
+ @endenv
+ @if ($errors->any())
+ <div class="text-center text-error">
+ <span>{{ __('auth.failed') }}</span>
+ </div>
+ @endif
+ <x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
+ @if (!$is_registration_enabled)
+ <div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
+ @endif
+ </form>
+ </div>
+ </div>
+ </div> --}}
+</x-layout-simple>
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php
index 028d930027..d5027419e8 100644
--- a/resources/views/auth/login.blade.php
+++ b/resources/views/auth/login.blade.php
@@ -9,8 +9,6 @@
<button
class="normal-case rounded-none btn btn-sm btn-primary bg-coollabs-gradient">{{ __('auth.register-now') }}</button>
</a>
- @else
- <div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
@endif
</div>
<div class="w-96">
@@ -31,6 +29,9 @@
</div>
@endif
<x-forms.button type="submit">{{ __('auth.login') }}</x-forms.button>
+ @if (!$is_registration_enabled)
+ <div class="text-sm text-center">{{ __('auth.registration_disabled') }}</div>
+ @endif
</form>
</div>
</div>