Remove frontend registration entrypoints #80
@@ -49,7 +49,6 @@ class FortifyServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
Fortify::loginView(fn (Request $request) => Inertia::render('auth/Login', [
|
Fortify::loginView(fn (Request $request) => Inertia::render('auth/Login', [
|
||||||
'canResetPassword' => Features::enabled(Features::resetPasswords()),
|
'canResetPassword' => Features::enabled(Features::resetPasswords()),
|
||||||
'canRegister' => Features::enabled(Features::registration()),
|
|
||||||
'status' => $request->session()->get('status'),
|
'status' => $request->session()->get('status'),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
@@ -66,8 +65,6 @@ class FortifyServiceProvider extends ServiceProvider
|
|||||||
'status' => $request->session()->get('status'),
|
'status' => $request->session()->get('status'),
|
||||||
]));
|
]));
|
||||||
|
|
||||||
Fortify::registerView(fn () => Inertia::render('auth/Register'));
|
|
||||||
|
|
||||||
Fortify::twoFactorChallengeView(fn () => Inertia::render('auth/TwoFactorChallenge'));
|
Fortify::twoFactorChallengeView(fn () => Inertia::render('auth/TwoFactorChallenge'));
|
||||||
|
|
||||||
Fortify::confirmPasswordView(fn () => Inertia::render('auth/ConfirmPassword'));
|
Fortify::confirmPasswordView(fn () => Inertia::render('auth/ConfirmPassword'));
|
||||||
|
|||||||
@@ -1,15 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Head, Link } from '@inertiajs/vue3';
|
import { Head, Link } from '@inertiajs/vue3';
|
||||||
import { dashboard, login, register } from '@/routes/index';
|
import { dashboard, login } from '@/routes/index';
|
||||||
|
|
||||||
withDefaults(
|
|
||||||
defineProps<{
|
|
||||||
canRegister: boolean;
|
|
||||||
}>(),
|
|
||||||
{
|
|
||||||
canRegister: true,
|
|
||||||
},
|
|
||||||
);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -38,13 +29,6 @@ withDefaults(
|
|||||||
>
|
>
|
||||||
Log in
|
Log in
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
|
||||||
v-if="canRegister"
|
|
||||||
:href="register()"
|
|
||||||
class="inline-block rounded-sm border border-[#19140035] px-5 py-1.5 text-sm leading-normal text-[#1b1b18] hover:border-[#1915014a] dark:border-[#3E3E3A] dark:text-[#EDEDEC] dark:hover:border-[#62605b]"
|
|
||||||
>
|
|
||||||
Register
|
|
||||||
</Link>
|
|
||||||
</template>
|
</template>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -9,14 +9,12 @@ import { Input } from '@/components/ui/input';
|
|||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
import { Spinner } from '@/components/ui/spinner';
|
||||||
import AuthBase from '@/layouts/AuthLayout.vue';
|
import AuthBase from '@/layouts/AuthLayout.vue';
|
||||||
import { register } from '@/routes/index';
|
|
||||||
import { store } from '@/routes/login';
|
import { store } from '@/routes/login';
|
||||||
import { request } from '@/routes/password';
|
import { request } from '@/routes/password';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
status?: string;
|
status?: string;
|
||||||
canResetPassword: boolean;
|
canResetPassword: boolean;
|
||||||
canRegister: boolean;
|
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -97,14 +95,6 @@ defineProps<{
|
|||||||
Log in
|
Log in
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
|
||||||
class="text-muted-foreground text-center text-sm"
|
|
||||||
v-if="canRegister"
|
|
||||||
>
|
|
||||||
Don't have an account?
|
|
||||||
<TextLink :href="register()" :tabindex="5">Sign up</TextLink>
|
|
||||||
</div>
|
|
||||||
</Form>
|
</Form>
|
||||||
</AuthBase>
|
</AuthBase>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,107 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import { Form, Head } from '@inertiajs/vue3';
|
|
||||||
import InputError from '@/components/InputError.vue';
|
|
||||||
import PasswordInput from '@/components/PasswordInput.vue';
|
|
||||||
import TextLink from '@/components/TextLink.vue';
|
|
||||||
import { Button } from '@/components/ui/button';
|
|
||||||
import { Input } from '@/components/ui/input';
|
|
||||||
import { Label } from '@/components/ui/label';
|
|
||||||
import { Spinner } from '@/components/ui/spinner';
|
|
||||||
import AuthBase from '@/layouts/AuthLayout.vue';
|
|
||||||
import { login } from '@/routes/index';
|
|
||||||
import { store } from '@/routes/register';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<AuthBase
|
|
||||||
title="Create an account"
|
|
||||||
description="Enter your details below to create your account"
|
|
||||||
>
|
|
||||||
<Head title="Register" />
|
|
||||||
|
|
||||||
<Form
|
|
||||||
v-bind="store.form()"
|
|
||||||
:reset-on-success="['password', 'password_confirmation']"
|
|
||||||
v-slot="{ errors, processing }"
|
|
||||||
class="flex flex-col gap-6"
|
|
||||||
>
|
|
||||||
<div class="grid gap-6">
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<Label for="name">Name</Label>
|
|
||||||
<Input
|
|
||||||
id="name"
|
|
||||||
type="text"
|
|
||||||
required
|
|
||||||
autofocus
|
|
||||||
:tabindex="1"
|
|
||||||
autocomplete="name"
|
|
||||||
name="name"
|
|
||||||
placeholder="Full name"
|
|
||||||
/>
|
|
||||||
<InputError :message="errors.name" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<Label for="email">Email address</Label>
|
|
||||||
<Input
|
|
||||||
id="email"
|
|
||||||
type="email"
|
|
||||||
required
|
|
||||||
:tabindex="2"
|
|
||||||
autocomplete="email"
|
|
||||||
name="email"
|
|
||||||
placeholder="email@example.com"
|
|
||||||
/>
|
|
||||||
<InputError :message="errors.email" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<Label for="password">Password</Label>
|
|
||||||
<PasswordInput
|
|
||||||
id="password"
|
|
||||||
required
|
|
||||||
:tabindex="3"
|
|
||||||
autocomplete="new-password"
|
|
||||||
name="password"
|
|
||||||
placeholder="Password"
|
|
||||||
/>
|
|
||||||
<InputError :message="errors.password" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="grid gap-2">
|
|
||||||
<Label for="password_confirmation">Confirm password</Label>
|
|
||||||
<PasswordInput
|
|
||||||
id="password_confirmation"
|
|
||||||
required
|
|
||||||
:tabindex="4"
|
|
||||||
autocomplete="new-password"
|
|
||||||
name="password_confirmation"
|
|
||||||
placeholder="Confirm password"
|
|
||||||
/>
|
|
||||||
<InputError :message="errors.password_confirmation" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
type="submit"
|
|
||||||
class="mt-2 w-full"
|
|
||||||
tabindex="5"
|
|
||||||
:disabled="processing"
|
|
||||||
data-test="register-user-button"
|
|
||||||
>
|
|
||||||
<Spinner v-if="processing" />
|
|
||||||
Create account
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-muted-foreground text-center text-sm">
|
|
||||||
Already have an account?
|
|
||||||
<TextLink
|
|
||||||
:href="login()"
|
|
||||||
class="underline underline-offset-4"
|
|
||||||
:tabindex="6"
|
|
||||||
>Log in</TextLink
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
</Form>
|
|
||||||
</AuthBase>
|
|
||||||
</template>
|
|
||||||
+1
-4
@@ -3,11 +3,8 @@
|
|||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
use Illuminate\Support\Facades\File;
|
use Illuminate\Support\Facades\File;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use Laravel\Fortify\Features;
|
|
||||||
|
|
||||||
Route::inertia('/', 'Welcome', [
|
Route::inertia('/', 'Welcome')->name('home');
|
||||||
'canRegister' => Features::enabled(Features::registration()),
|
|
||||||
])->name('home');
|
|
||||||
|
|
||||||
Route::get('api/docs/openapi.json', function (): Response {
|
Route::get('api/docs/openapi.json', function (): Response {
|
||||||
$path = base_path('docs/openapi/kanbangit-api.openapi.json');
|
$path = base_path('docs/openapi/kanbangit-api.openapi.json');
|
||||||
|
|||||||
Reference in New Issue
Block a user