Advance Authentication

URIMETHOD
/api/forgot-passwordPOST
/api/reset-passwordPOST
/api/email/verification-notificationPOST
/api/confirm-passwordPOST

Test with Postman

You can import the postman collection and import the postman environment

Just replace the {{base_url}} variable for your app url, you can send requests with json data to test all endpoints.

Forgot Password

Field required:

{
  "email": "john@doe.com"
}
  • This endpoint does not require a token, because it is used if the user lost the password.

In config/json-api-auth.php you can set an endpoint:

'new_password_form_url' => env('FRONTEND_APP_URL', 'http://frontend.test') .'/new-password',

You can change it directly there or add a variable in .env file FRONTEND_APP_URL.

Email Verification

This request does not require any field only the token.

Define a redirect endpoint

In config/json-api-auth.php you can set an endpoint:

'email_account_was_already_verified_url' =>  env('FRONTEND_APP_URL', 'http://frontend.test') . '/already-verified',

'email_account_just_verified_url' => env('FRONTEND_APP_URL', 'http://frontend.test') . '/verified', 

Password Verification

Fields required for password verification:

{
  "password": "YourPassword"
}

Customize the advance authentication process

You can customize the behavior of any endpoint in app/Http/ directory:

VALIDATIONCONTROLLER
Requests/JsonApiAuth/PasswordResetLinkRequest.phpControllers/JsonApiAuth/PasswordResetLinkController.php
Requests/JsonApiAuth/NewPasswordRequest.phpControllers/JsonApiAuth/NewPasswordController.php
no has request validationControllers/JsonApiAuth/EmailVerificationNotificationController.php
no has request validationControllers/JsonApiAuth/ConfirmablePasswordController.php