Login and Registration with React Native and Laravel | Expo | Sanctum
HTML-код
- Опубликовано: 3 июл 2024
- Hello everyone,
In the last video, we saw how to use React Native with Firebase.
• React Native Login and...
In this video, we will see how to connect React Native app with Laravel using Laravel API. We will create Login and Registration with Laravel and React Native.
00:00:00 - Introduction
00:00:32 - Server Side Considerations
00:03:10 - Sanctum
00:05:19 - Helper / Service Class
00:16:07 - Choosing between api.php and web.php
00:18:46 - React Native considerations, .env
00:24:28 - Testing & Debuging Register API, expo device name package
00:44:30 - Creating Login API
00:46:45 - Reusing validation function
00:51:24 - Modifying login component, testing login API
01:00:10 - Wrap Up
My Vue 3 Udemy Course
www.udemy.com/course/vue-3-us... Наука
Thankyou so much.You are so great.I was searching for this video and I finally found it.You explain everything in detail and thanks for that.God bless you , and do more videos like these.
Great job man! Thank you for this tutorial. Now so few videos about laravel+sanctum+react but you did it. Please make similar videos abot this stack!!
Thanks a lot for the kind words. For sure, will do more videos on the same stack :)
which font you use in the editor please tell me? Thank you
Thanks bro, but...
I have a error because the field "tokenable_id" not change when insert a new token beacuse the tokenable_id value its always the same.
The error is "Integrity constraint violation: 1048 Column 'tokenable_id' cannot be null..."
How to fix it?
Thanks.
Good work, however you didn't explain how to store the token and use it to keep the user logged in.
Thank you man Can you please provide the source code if possible??
Nice tutorial !! but can you help me about how to logout after login on react native?
Thanks for the feedback 🙂
To answer your question, it is pretty simple.
Step 1.
Create a Logout Button and onpress run a logout function which clears all the session or data stored locally (user token, user details etc.)
Step 2. Make an Api call to server in case if any server side actions are required like setting status to not active, deleting sanctum token if required.
Now if api call is made then step can be written in the then() of the axios of api call.
After successful logout navigate the user to home screen.
Hope this helps.
@@WebDevWithArtisan wokeyy thanks broo
Nice....no source code ?
Thanks. Unfortunately, for this video I did not maintain any repo so many apologies I cannot provide the source code.
@@WebDevWithArtisan huehue
Source code?
Laravel recommends no longer using Lumen. They suggest using Laravel with Laravel Octane.
That’s right. Lumen is no longer recommended officially by Laravel. Thanks for the mention.
Please next time EQ those low frequencies out of your voice next time, its extremely annoying to listen to your voice with headphones on
Thanks for the feedback and sorry for the annoyance.
Next time i suggest you to finish project first with no error. After that record a video and rewrite the codes from your finished project. By this way we waste too much time to learn for 20 mins video.
That is the worst way to learn, by him leaving the errors in the videos it allows us to see how he goes about solving them. What if you watch the video and come across an error he edited out then what? You gonna come in the comment asking “ hey bro how do I fix this problem “ but if you watched it with the errors your ass wouldn’t be here asking. Or just fast forward the part you don’t wanna see
@@youngjojo3052 yea thats right but he can pause recording when got error and resume when he find fix. And can show us how did he resolve this…
@@Confickerx I understand where you coming from but I feel like doing it this is some people won’t have to deal with waiting for him to respond to their comments.