<?php

use App\Http\Controllers\LoginController;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [LoginController::class, 'login'])->name('login');
Route::post('send-sms-auth-token', [LoginController::class, 'sendSmsAuthToken'])->name('send-sms-auth-token');
Route::post('resend-sms-auth-token', [LoginController::class, 'resendSmsAuthToken'])->name('resend-sms-auth-token');

Route::get('/confirm-auth-token', [LoginController::class, 'confirmAuthToken'])->name('confirm-auth-token');
Route::post('/process-confirm-auth-token', [LoginController::class, 'processConfirmAuthToken'])->name('process-confirm-auth-token');

Route::get('/account-setup', [LoginController::class, 'accountSetup'])->name('account-setup');
Route::post('/account-setup', [LoginController::class, 'submitAccountSetup'])->name('submit-account-setup');

Route::get('/hr-invitation/{hrInvitationToken}', [LoginController::class, 'logInWithHrInvitationToken'])->name('log-in-with-hr-invitation-token');

Route::get('/logout', function(){
	return Redirect::to('https://pro.leadershiphealth.org/logout');
});
