diff --git a/app/Http/Controllers/AuthController.php b/app/Http/Controllers/AuthController.php index 9612844..1e81eae 100644 --- a/app/Http/Controllers/AuthController.php +++ b/app/Http/Controllers/AuthController.php @@ -218,6 +218,18 @@ class AuthController extends Controller return response()->json(['message' => 'Register successfully you must be login.'], 200); } + public function resendLink(Request $request) + { + $this->validate($request, [ + 'email' => 'required|email', + 'type' => 'required|string' + ]); + + $this->sendVerification($request->email, $request->type); + + return response()->json(['message' => 'Link resend successfully'], 200); + } + public function createFingerPrint() { $attributes = [ diff --git a/routes/api.php b/routes/api.php index 6986afd..3aa3897 100644 --- a/routes/api.php +++ b/routes/api.php @@ -32,6 +32,8 @@ $router->group(['prefix' => 'auth'], function () use ($router) { $router->post('verification', 'AuthController@verification')->name('verification'); + $router->post('resend', 'AuthController@resendLink'); + $router->get('google/redirect', 'AuthController@redirectToGoogle')->name('google.redirect'); $router->get('google/callback', 'AuthController@handleGoogleCallback')->name('google.callback');