Scrypster you just earned yourself a viewer here. That was a short and smooth tutorial. Just what I was looking for. Thanks a lot and I'm looking forward for more tutorials
Just want to express my thanks for uploading this video. @ 6:10, for some reason I cannot access user state from vuex store, using the method being shown here, which uses the following. computed: { user: { get() { return this.$store.state.currentUser.user }} } I kept getting error, basically the browser telling me that no currentUser is not defined. Solution that helped me: I used mapGetters, which helps to make vuex state available in any component that you want. Below is what I did. In currentUser.js const getters = { user: state => state.user } In loginForm.vue import { mapGetters } from 'vuex'; export default { computed: mapGetters(['user']), } This is how I learned vuex, not saying it is better, but it works and I can understand it much easier
As well at 15:20, I had to use mapActions, for some reason mapActions just worked but the method shown did not. What I did: import { mapActions } from 'vuex'; export default { data(){ return{ user: {email: '', password: ''} } }, methods: { ...mapActions(['loginUser']), login() { this.loginUser(this.user)} } }
Thanks for such a nice tutorial which I was looking for long. Please extend this tutorial covering crud, advanced data table, permission, roles, activity log. Thanks again.
How do I validate if the username or password is incorrect? How do I pass a variable from the currentUser.js file to the LoginComponent to show the errors?
thank you for your course. One more lesson is required. How to switch between menu items. We must use vue-router or laravel routing will solve that problem?
i was looking if you can give some information about refreshing the personal access token. or if the access token is expired how to keep the user logged in without showing him the login page every time when the access token expires
Great job! Thanks a lot. Can you zoom the editor and browser... The resolution of your videos are really hard on mobile phone... You have lots of unused space if you record your videos. Thank you
Is it safe to store the token in the local storage? Can't you just check if it exists? Also, if the API has sanctum guard, you can return 401 error if no token
This is very good video, but can you please show us how to do error handling from current user -> loginForm component. If a user gets a error from axios how do we handle it?
I receive a error in the console log When I use AXIOS to post to the API: axios.post("/api/v1/user/login", { email: user.email, password: user.password }) Is this sentence correct ?
@@ezzabdelhakim7495 if both backend and frontend are separated, I think it is the only way enough to use local storage just to maintain the frontend open as logged user. Combined with the strategy of validating and malform the token before it should save. or use refresh token every 1 min, to change the save token
I think security is relative to your application. If your app is storing recipes for baking cakes, sure I think this is fine. If your app is for trading stocks, you may want to handle this in a different manner. There are a lot of different techniques and and security strategies. It really depends on your application and how many hoops you want to jump through. I think in most cases using cookies or localStorage is acceptable coupled with other best practices like HTTPS.
How do I validate if the username or password is incorrect? How do I pass the error that retrieves from the Usercontroller into currentUser.js to LoginComponent to show the error?
Bro, im doing nativescript-vue app with vuex and axios and this video was exactly what was looking form. THANK YOU!!
Very thoroughly and efficiently explained, This series is gonna save some lives!
Thank you!
It's nice to see a Vue/Laravel guide that goes into why you do things, not just how.
Scrypster you just earned yourself a viewer here. That was a short and smooth tutorial. Just what I was looking for. Thanks a lot and I'm looking forward for more tutorials
You are a real life saver. Hope you are going to make more videos.
This is what I was exactly looking for !
Just want to express my thanks for uploading this video.
@ 6:10, for some reason I cannot access user state from vuex store, using the method being shown here, which uses the following.
computed: { user: { get() { return this.$store.state.currentUser.user }} }
I kept getting error, basically the browser telling me that no currentUser is not defined.
Solution that helped me:
I used mapGetters, which helps to make vuex state available in any component that you want.
Below is what I did.
In currentUser.js
const getters = {
user: state => state.user }
In loginForm.vue
import { mapGetters } from 'vuex';
export default {
computed: mapGetters(['user']),
}
This is how I learned vuex, not saying it is better, but it works and I can understand it much easier
As well at 15:20, I had to use mapActions, for some reason mapActions just worked but the method shown did not.
What I did:
import { mapActions } from 'vuex';
export default {
data(){ return{ user: {email: '', password: ''} } },
methods: {
...mapActions(['loginUser']),
login() { this.loginUser(this.user)}
}
}
This is exactly what I'm trying to accomplish. Perfect!
seems like video is skipped on 19:45 right ?
Thanks for such a nice tutorial which I was looking for long. Please extend this tutorial covering crud, advanced data table, permission, roles, activity log. Thanks again.
Tu vídeo me fue de mucha ayuda, muchas gracias, eres el mejor. Saludos desde Perú.
How do I validate if the username or password is incorrect? How do I pass a variable from the currentUser.js file to the LoginComponent to show the errors?
thank you for your course. One more lesson is required. How to switch between menu items. We must use vue-router or laravel routing will solve that problem?
awesome tutorial just a learned a lot in a short video
Nice Explanation Thanks a lot.
i was looking if you can give some information about refreshing the personal access token. or if the access token is expired how to keep the user logged in without showing him the login page every time when the access token expires
Great job! Thanks a lot.
Can you zoom the editor and browser... The resolution of your videos are really hard on mobile phone...
You have lots of unused space if you record your videos.
Thank you
Thank you! ❤️ This is an older video but I have since zoomed in on all my newer content. It’s been a learning experience.
@@scrypster wanted to see those ones cause your videos are great but now the font size was a burden
Is it safe to store the token in the local storage?
Can't you just check if it exists?
Also, if the API has sanctum guard, you can return 401 error if no token
Thank you. Great Video.
Hi, is it possible to put code in github, it's much easier to debug and understand
This is very good video, but can you please show us how to do error handling from current user -> loginForm component. If a user gets a error from axios how do we handle it?
Good explanation !
I receive a error in the console log When I use AXIOS to post to the API:
axios.post("/api/v1/user/login", {
email: user.email,
password: user.password
})
Is this sentence correct ?
Hi, I would like to ask if, is it safe to use localstorage for saving an access token??
@@ezzabdelhakim7495 if both backend and frontend are separated, I think it is the only way enough to use local storage just to maintain the frontend open as logged user. Combined with the strategy of validating and malform the token before it should save.
or use refresh token every 1 min, to change the save token
How did you post to the url without typing then full url of website?
This is nice, explain really well. Do we have github link for the project?
you just save my life. thanks
is it secure to save the token at local storage?
I think security is relative to your application. If your app is storing recipes for baking cakes, sure I think this is fine. If your app is for trading stocks, you may want to handle this in a different manner. There are a lot of different techniques and and security strategies. It really depends on your application and how many hoops you want to jump through. I think in most cases using cookies or localStorage is acceptable coupled with other best practices like HTTPS.
Nicely done
Thanks. But now we don't need to make a custom login system, as Laravel 8 provides Jetstream with Inertia having login scaffolding.
could you please provide the github repo for this tutorial series?
So this is like a part 2 of a project cuz you using an alredy created project. So where is par 1 ?
Post your login controller please, or share your code in git repository.
This video is awesome!!! Where can I find the source code?
can we have the source code please, i just want to know how did you create the logout.
Anyone know why Auth::user() is null in LoginController?
Hi, very good video! I've seen some of yours they're understandable and well explainded, good job! can U add the git link to the code please?
👍
please have my babyes!
kulang
How do I validate if the username or password is incorrect? How do I pass the error that retrieves from the Usercontroller into currentUser.js to LoginComponent to show the error?
.catch() i assume like you would if you did the axios calls on component