Комментарии:
Hi, how you handle wrong password input of user in local strategy? In my case with proper credentials all work fine, but if user input wrong password or userName, i send from backend response with error description("Wrong password","Wrong userName" and I wont show this text to user), but i can't read it in "catch" section of "loginWith" function cause right after logIn request the auth-module again send request to "user" endpoint and it rejected(cause on backend "user" endpoint only for authorized users). Thanks
ОтветитьThis was really helpful. Now I see the value in making the request twice!
ОтветитьI think lot of people is confusing since they are using JWT and the user info is already in the token so a second call is just not needed , a work around is to replace the fetchUser function for a function to extract the user details from the token and then set the user with those details
ОтветитьHi, when the password of user wrong and the api send response with error message why auth still act as the loginin success ?
Ответитьanother question in auth config I disable the local storage and active cookie to not save user info in localstorage but also still save auth user info in local storage
ОтветитьThanks, for this tutorial! Would love a tutorial on creating custom schemes for authentication.
ОтветитьI still don't understand, after logging in successfully, receiving the token he calls a route from api / users, how is this identifying the user he has to search for? just by the token? so I have to have an endpoint that searches for the user from the token?
Because at least here, when requesting users he doesn't send any data other than the token.
i am trying to login with laravel passport data successfully returning from back end but login is not working in front end
Ответитьhi, nice video. please create a video with different domain between frontend login and backend api, i have cors and csrf issue using laravel sanctum and nuxt 2
Ответитьwhen i call login endpoint then its only call login endpoint but not calling user please any one have solution
Ответить