Category : authentication

I have my Codeigniter application running in htdocs ==> htdocs/ciapp And core php application also in htdocs ==> htdocs/coreapp Both apps are using a single MySQL DB User lands on ciapp and login there, Afterwards, the user goes to coreapp and also login there. Authentication is done from the same user table (using the same ..

Read more

Hi im trying figure out how to display message(toastr) after successful registration, im using laravel 8 with jetstream authetication, so far i couldnt find anything useful on google… by the way im in RegistredUserController.php public function store(Request $request, CreatesNewUsers $creator): RegisterResponse { event(new Registered($user = $creator->create($request->all()))); $this->guard->login($user); return app(RegisterResponse::class); } i tried modifying this block ..

Read more

My login controller public function authenticate(Request $request) { $credentials = $request->validate([ ‘username’ => [‘required’], ‘password’ => [‘required’], ]); if (Auth::attempt($credentials)) { $request->session()->regenerate(); return redirect()->intended(‘/’); } return back()->withErrors([ ‘error’ => ‘The provided credentials do not match our records.’, ]); } middleware that i check the auth class AuthorizeUser { /** * Handle an incoming request. * ..

Read more

I am a beginner in laravel .I am using guard for multi authorization. I am having this issue in my admin login: TypeError IlluminateAuthSessionGuard::login(): Argument #1 ($user) must be of type IlluminateContractsAuthAuthenticatable, AppModelsAdmin given, called in C:UsersDELLsurveyappHttpControllersAdminController.php on line 34 This is the AdminController.php file <?php namespace AppHttpControllers; use AppModelsAdmin; use IlluminateHttpRequest; use IlluminateSupportFacadesAuth; use ..

Read more

here is my php code $sql = " SELECT * FROM `users` WHERE `phone` =? AND `password` =?"; ///prepared satement if ($stmt = mysqli_prepare($link, $sql)) { mysqli_stmt_bind_param($stmt, "ss", $phone, $password); mysqli_stmt_execute($stmt); mysqli_stmt_store_result($stmt); if (mysqli_stmt_num_rows($stmt) === 1) { //login success } else { echo "unmatched"; } mysqli_stmt_close($stmt); } How can we get other data of rows ..

Read more