Skip to content

Commit

Permalink
fix: english language
Browse files Browse the repository at this point in the history
  • Loading branch information
64knl committed Feb 9, 2024
1 parent b133b72 commit b8904ef
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions lang/en/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'verify_email_link_sent' => 'A fresh verification link has been sent to your email address.',
'verify_email_success' => 'Account successfully verified.',
'verify_wrong_email' => 'Click here to block this attempt if you were not the one who tried to login.',
'block_account_title' => 'Account blocked',
'block_account_message' => 'The account has been blocked.',
'verify_block_account_title' => 'Block account?',
'verify_block_account_message' => 'Are you sure you want to block this account? You will not be able to login to SiteBoss. An administrator can unblock your account.',
Expand Down
15 changes: 11 additions & 4 deletions routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@
|
*/
Route::prefix(config('siteboss.api_prefix'))->group(function () {
Route::prefix('api')->group(function () {

// Routes account management
Route::group(['prefix' => '/{locale}', 'middleware' => [ ValidateSignature::class,'throttle:6,1', 'set-forget-locale']], function () {

// Verify email address
Route::get('email/verify/{id}/{hash}', [VerifyEmailController::class, '__invoke'])
->middleware([ValidateSignature::class, 'throttle:6,1'])
->name('siteboss.verification.verify');


// Routes for blocking your own account
Route::get('email/verify/block/{id}/{hash}', [VerifyEmailController::class, 'block'])
->middleware([ValidateSignature::class, 'throttle:6,1'])
->name('siteboss.verification.block');
});


Route::prefix('api')->group(function () {

// Unauthenticated routes
Route::namespace('Forms')->group(function () {
Expand Down
1 change: 1 addition & 0 deletions src/Auth/Notifications/VerifyEmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ protected function verificationUrl($notifiable)
Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
[
'id' => $notifiable->getKey(),
'locale'=> app()->getLocale(),
'hash' => sha1($notifiable->getEmailForVerification()),
]
);
Expand Down
1 change: 1 addition & 0 deletions src/Http/Controllers/Auth/VerifyEmailController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function __invoke(Request $request)
'siteboss.verification.block',
Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),
[
'locale' => app()->getLocale(),
'id' => $request->route('id'),
'hash' => $request->route('hash'),
]);
Expand Down

0 comments on commit b8904ef

Please sign in to comment.