Skip to content

Commit 5f5ba12

Browse files
fix: updated api route url
1 parent c5a9787 commit 5f5ba12

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

src/AuthKitServiceProvider.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,6 @@ private function registerPublishables(): void
366366
__DIR__ . '/../database/migrations' => database_path('migrations'),
367367
], 'authkit-migrations');
368368

369-
$this->publishes([
370-
__DIR__ . '/../src/Http/Controllers' => app_path('Http/Controllers/AuthKit'),
371-
], 'authkit-controllers');
372-
373369
$this->publishes([
374370
__DIR__ . '/Routes/web.php' => base_path('routes/authkit-web.php'),
375371
__DIR__ . '/Routes/api.php' => base_path('routes/authkit-api.php'),

src/Routes/api.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@
5151
* Register action.
5252
*/
5353
Route::post(
54-
'/register',
54+
'/register/process',
5555
ControllerResolver::resolve('api', 'register', RegisterController::class)
5656
)->name((string) ($apiNames['register'] ?? 'authkit.api.auth.register'));
5757

5858
/**
5959
* Login action.
6060
*/
6161
Route::post(
62-
'/login',
62+
'/login/process',
6363
ControllerResolver::resolve('api', 'login', LoginController::class)
6464
)
6565
->middleware(array_values(array_filter([
@@ -71,7 +71,7 @@
7171
* Forgot password action (send reset link/token).
7272
*/
7373
Route::post(
74-
'/forgot-password',
74+
'/forgot-password/process',
7575
ControllerResolver::resolve('api', 'password_forgot', ForgotPasswordController::class)
7676
)
7777
->middleware(array_values(array_filter([
@@ -86,7 +86,7 @@
8686
* The verification is "peek-only" and must not consume the token.
8787
*/
8888
Route::post(
89-
'/reset-password/verify-token',
89+
'/reset-password/verify-token/process',
9090
ControllerResolver::resolve('api', 'password_verify_token', VerifyPasswordResetTokenController::class)
9191
)
9292
->middleware(array_values(array_filter([
@@ -98,7 +98,7 @@
9898
* Reset password action (consume token + set new password).
9999
*/
100100
Route::post(
101-
'/reset-password',
101+
'/reset-password/process',
102102
ControllerResolver::resolve('api', 'password_reset', ResetPasswordController::class)
103103
)
104104
->middleware(array_values(array_filter([
@@ -112,7 +112,7 @@
112112
* Used during login flow when a user must satisfy a pending 2FA challenge.
113113
*/
114114
Route::post(
115-
'/two-factor/challenge',
115+
'/two-factor/challenge/process',
116116
ControllerResolver::resolve('api', 'two_factor_challenge', TwoFactorChallengeController::class)
117117
)
118118
->middleware(array_values(array_filter([
@@ -126,7 +126,7 @@
126126
* Resends a challenge delivery for the current pending login context.
127127
*/
128128
Route::post(
129-
'/two-factor/resend',
129+
'/two-factor/resend/process',
130130
ControllerResolver::resolve('api', 'two_factor_resend', TwoFactorResendController::class)
131131
)
132132
->middleware(array_values(array_filter([
@@ -140,7 +140,7 @@
140140
* Verifies a recovery code for the current pending login context.
141141
*/
142142
Route::post(
143-
'/two-factor/recovery',
143+
'/two-factor/recovery/process',
144144
ControllerResolver::resolve('api', 'two_factor_recovery', TwoFactorRecoveryController::class)
145145
)
146146
->middleware(array_values(array_filter([
@@ -152,7 +152,7 @@
152152
* Verify email using token (token driver).
153153
*/
154154
Route::post(
155-
'/email/verify/token',
155+
'/email/verify/token/process',
156156
ControllerResolver::resolve('api', 'email_verify_token', VerifyEmailTokenController::class)
157157
)
158158
->middleware(array_values(array_filter([
@@ -172,7 +172,7 @@
172172
* Send email verification notification (link or token depending on config).
173173
*/
174174
Route::post(
175-
'/email/verification-notification',
175+
'/email/verification-notification/process',
176176
ControllerResolver::resolve('api', 'email_send_verification', SendEmailVerificationController::class)
177177
)
178178
->middleware(array_values(array_filter([
@@ -184,7 +184,7 @@
184184
* Logout action.
185185
*/
186186
Route::post(
187-
'/logout',
187+
'/logout/process',
188188
ControllerResolver::resolve('api', 'logout', LogoutController::class)
189189
)->name((string) ($apiNames['logout'] ?? 'authkit.api.auth.logout'));
190190

0 commit comments

Comments
 (0)