Questions tagged [laravel-authentication]

Laravel ships with several pre-built authentication controllers for user registration, authentication, and password reset.

Laravel ships with several pre-built authentication controllers for user registration, authentication, and password reset.

376 questions
42
votes
8 answers

Checking which `guard` is loggedin

I have a multiauth laravel 5.2 app, with the fallowing guards defined on config/auth.php: ... 'admin' => [ 'driver' => 'session', 'provider' => 'admin', ], 'user' => [ 'driver' => 'session', 'provider' => 'user', ], ... So, admin…
Miguel
  • 1,579
  • 5
  • 18
  • 31
30
votes
9 answers

How to Verify Email Without Asking the User to Login to Laravel

I am developing a Laravel application. My application is using Laravel built-in auth feature. In the Laravel auth when a user registers, a verification email is sent. When a user verifies the email click on the link inside the email, the user has to…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
20
votes
6 answers

How to properly start Laravel 8 with Bootstrap & authentication

I face the following image every time I want to start a new Laravel 8 project with authentication routes set up using the laravel/ui package and Bootstrap scaffolding. Meaning that the Bootstrap is not yet loading up! Therefore, I have to re-run…
user9277271
20
votes
10 answers

Command 'ui' is not defined in laravel 6.0

I start a new project in laravel but my composer installed a fresh version of laravel 6.0.1. Php artisan make:auth command can't work. I try many times but error can't remove composer require laravel/ui installed but when I use the second…
user12033292
18
votes
4 answers

Disable auto login after Laravel registration

I need to disable auto login after registering a new user in a Laravel application. I have found examples for older versions, but since Laravel 5.4 there is no AuthController as it divided to LoginController and RegisterController.
Shashika
  • 1,606
  • 6
  • 28
  • 47
17
votes
3 answers

Laravel 8: Using Fortify in APIs

Can Laravel Fortify be used in the context of API? From what I understand, Fortify (although being headless, i.e. doesn't include a UI layer) allows us to customize Login and Register pages, but it automatically redirects to HOME page upon…
dotNET
  • 33,414
  • 24
  • 162
  • 251
17
votes
4 answers

Undefined class constant 'App\Providers\RouteServiceProvider::HOME'

After upgrading the laravel 5.8 to laravel 6.x I am getting this error: Undefined class constant 'App\Providers\RouteServiceProvider::HOME' Before upgrading the application login system was the custom. After upgrading to laravel 6.x I want to use…
11
votes
3 answers

Laravel 8 Jetstream: adding new field to the registration process

I started building a web application using Laravel 8. I have noticed that quite a lot of things have changed in Laravel 8 including authentication. Now, I am trying to use Jetstream for auth. I have run the following command to integrate it into the…
Wai Yan Hein
  • 13,651
  • 35
  • 180
  • 372
10
votes
5 answers

How to add extra logic on login condition in Laravel 5.2

I just wanted to say if the user is not active, don't allow to login. I have made the controller as below, I am not sure what I am missing or what else I have to do here to make this work!
Abdul
  • 472
  • 1
  • 5
  • 13
9
votes
2 answers

Changing Laravel auth table name and column names

I want to change the table name and some column names of laravel auth table. Change table name from 'users' to 'accounts' Change table column name from 'name' to 'username' Change table column name from 'email' to 'email_addr' Change table column…
9
votes
4 answers

Redirect to Custom URL after Registration in Laravel 5.5

I am working on cart in laravel 5.5. Whenever guests click on "Add to cart", i am redirecting to login. If they have account, they will login and redirecting to product info they have selected. Otherwise they are registering. I wanted to redirect to…
Sridhar
  • 101
  • 2
  • 2
  • 5
8
votes
3 answers

Where to add parameter to Route: verification.notice {language}/email/verify

Missing required parameters for [Route: verification.notice] [URI: {language}/email/verify] I added the laravel email verification to my project, after using localization. But now I have the problem that the Route: verification.notice is missing a…
8
votes
4 answers

Laravel Auth manually login by id

I am new to laravel and I am working with a functionality where we insert data in user table with DB::insert(); After that i get last id with $user_id = DB::getPdo()->lastInsertId(); Now I want user to login after register and I am trying to…
Anuj kumar
  • 81
  • 1
  • 1
  • 4
8
votes
9 answers

How to get logged in user data into Laravel controller

I am working on laravel 5.4, i have used the auth for user login at client side,now i want the logged in user details at the Controller, view side by writing below code i got that: {{ Auth::user()->name }} // this works on view page only. Suggest…
Anand Maurya
  • 170
  • 1
  • 1
  • 12
7
votes
1 answer

Password reset in Laravel by email or mobile

By default Laravel 5.5's password reset system works on email, but I need to add support for a mobile number (verify by OTP and generate a token and redirect to password reset page). I am doing all this part and I have created a mobile column on…
Hasan Hafiz Pasha
  • 1,402
  • 2
  • 17
  • 25
1
2 3
25 26