-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
If load_user_from_database' is set to false, there is no way to get user info from db ? #108
Comments
If you set it to “false” of course this package won’t try to load the user from the database. So , you need to do it by yourself using some middleware |
but bro if the user is logging in for the first time, how would db contain user data to be able to pull his info ? all am asking for is a feature wherein i could define which routes i want to just authenticate(for initial signup api) and all other routes on which i want to have retrieveByCredentials or load_from_db to be true |
can u make this method more modular so that i can call it explicitly ? where second parameter is a boolean and would define whether to load user from db or not ! for example
|
Take a look at “user_provider_custom_retrieve_method” on README. |
Yeah i read that but, that part would execute only if the load_user_from_db is true… |
If load_user_from_database is set to false, and i try auth()->user() it throws an empty array.
Is there any specific method available that i can call to get the user data from db ?
my flow is as follows :-
the user authenticates through keycloak > is forced on to signup page(due to a middleware that checks for user auth and signupcomplete column) > user signs up > records in db and sets signupcomplete to 1
now since i have set the load_user_from_database to false how do i get user info from db like auth()->user() or any other way ?
The text was updated successfully, but these errors were encountered: