Thanks so much, bro. Recently had a shot at coding my own version of an Auth/Refresh Token module for use with the Deputy API. It was... uh, functional... but suffice to say I still have a lot to learn and your implementation is infinitely superior. Learned a lot and have better code as the ultimate result so thank you again, you and your tutes are a blessing.
Good tutorial. Though, you don't need an else statement when you always return something in the if statement. You can just put the else logic after the if statement. It makes the code a bit cleaner
Awesome Simon. I learned ionic from your videos only.Could you please make video on the audio and video calling with chat using twilio ionic5. Thank you
Because you're one of the most loyal followers in here I've uploaded the code for you here: github.com/saimon24/nest-token-api-example At least I think that's it, haven't found any other code that looked like it :D
@@galaxies_dev Thank you very much Simon! Learned some things watching the code, but I wonder how you deploy it. In the procfile you simply run node dist/ but the dist folder is not in the repo (which is good), so I dont understand how heroku can build the app then
Hi Simon great tutorial 👏👏👏 Can u make a video on getting updated data by other user with out refresh or recall of same api ( May be a Chat result 😉) without firebase collection, using pure rest API call.
Great video. I would suggest a good teaching style is to apply a solution to each stage of the build and demonstrate that segment as you go along. Especially if you tackle harder to grasp subjects! Otherwise a super helpful video, thanks Simon
Hey Simon, thanks for the tuto, is great! But I have a question... What happends if refresh token was expired? I recived from my back (laravel) an http 200 with null value, but the application crash... Uncaught (in promise): EmptyError: no elements in sequence - from line const refreshToken = from(Storage.get({ key: REFRESH_TOKEN_KEY })); I think the best choice is redirect the user to the login screen, can you help me? i don't know how to do that without errors... thanks in advanced!
Yeah when loading the token you should always check if it's actually still valid, or otherwise handle the response from your backend which should be 40x if the token is not valid anymore!
You actually do the video about this topic that I requested in your 5 Best Practices video. And yes, I am absolutely very happy and excited about this. Finally get to see the correct or more proper way I guess to manage token. Thank you so much! Looking forward for more contents!
@@galaxies_dev hahahaha I do this for myself because in each tutorial you show some hidden gem of ionic or capacitor (probably you don't realize that, but beleive me, you do it) and I find it very useful. For example maybe you explain something about capacitor community plugins that is interesting, like the import for proper working on web, but since the tutorial is about a whole bigger thing, that comment cannot be found easily again. Timestamps help me when I need to find those kind of comments you make, or as I called them before, hidden gems :)
Hi Simon, I'm writing to ask you a few things, I recently bought a MacBook Air M1, and compiling my project from Chrome with Ionic serve works perfectly, but when I move with Capacitor in Xcode it gives me an infinity of errors. what does it depend on, from the fact that I have an M1, am I doing something wrong? Thanks for the reply.
@@galaxies_dev Sorry Simon, but I had not seen this notification so I reply a little late, I tried on an iMac with High Sierra and Xcode 10.1 and the errors remain, so I think there will be a need for a minimal version of XCode to get everything to work? At the time of writing I have Ionic 6.13
Hey Simon, great video as always! Are you planning to shoot a video with the same token interceptor but using http native instead, could that be interesting?
Hi Simon, thanks for this tutorial, I have a quick question. How can i get the payload of the authenticated user after successful login using the stored token?
Hi Simon, great tutorials... Can you continue with API backend tutorial. Thx a lot...
Thanks so much, bro. Recently had a shot at coding my own version of an Auth/Refresh Token module for use with the Deputy API. It was... uh, functional... but suffice to say I still have a lot to learn and your implementation is infinitely superior. Learned a lot and have better code as the ultimate result so thank you again, you and your tutes are a blessing.
Good tutorial. Though, you don't need an else statement when you always return something in the if statement. You can just put the else logic after the if statement. It makes the code a bit cleaner
Awesome Simon. I learned ionic from your videos only.Could you please make video on the audio and video calling with chat using twilio ionic5. Thank you
Thx Simon, will use this in my app
Ionic Framework + Capacitor + Simon: The best! 😎
Thanks it is awesome
Welcome 😊
Hello Simon, Thanks for the content! But I have question. Why do you use canLoad instead canActivate?
This was a long time ago - actually not sure. I think canLoad runs only once while canActivate runs every time, right?
Love your content 😍 BTW
hello Simon.
¿you have implemented
augmented reality with ionc?.
I am researching it for a project, ¿do you know if it is possible to do it?
No haven't done so far :/
Hi Simon, is there a chance we can get the source code of the backend?
Because you're one of the most loyal followers in here I've uploaded the code for you here: github.com/saimon24/nest-token-api-example
At least I think that's it, haven't found any other code that looked like it :D
@@galaxies_dev Thank you very much Simon! Learned some things watching the code, but I wonder how you deploy it. In the procfile you simply run node dist/ but the dist folder is not in the repo (which is good), so I dont understand how heroku can build the app then
@@galaxies_dev that's for nest, not ionic Simon.
Hi Simon great tutorial 👏👏👏
Can u make a video on getting updated data by other user with out refresh or recall of same api
( May be a Chat result 😉) without firebase collection, using pure rest API call.
Great video. I would suggest a good teaching style is to apply a solution to each stage of the build and demonstrate that segment as you go along. Especially if you tackle harder to grasp subjects! Otherwise a super helpful video, thanks Simon
IONIC is the BEST.
can't you add the git link of this code?
thx a lot - you save my days
Hey Simon, thanks for the tuto, is great!
But I have a question... What happends if refresh token was expired? I recived from my back (laravel) an http 200 with null value, but the application crash...
Uncaught (in promise): EmptyError: no elements in sequence - from line const refreshToken = from(Storage.get({ key: REFRESH_TOKEN_KEY }));
I think the best choice is redirect the user to the login screen, can you help me? i don't know how to do that without errors...
thanks in advanced!
Yeah when loading the token you should always check if it's actually still valid, or otherwise handle the response from your backend which should be 40x if the token is not valid anymore!
You actually do the video about this topic that I requested in your 5 Best Practices video. And yes, I am absolutely very happy and excited about this. Finally get to see the correct or more proper way I guess to manage token. Thank you so much! Looking forward for more contents!
Thanks, Simon, Any tutorial about convert videos using any native plugin. then upload to Firebase storage with ionic 5?
0:41 Overview
3:08 Api service
8:22 Login page
9:31 Inside page
10:06 Guard
12:56 Interceptor
15:15 Me while programming...
Where can I hire you? Added some more timestamps, gonna make this another step in my upload process in the next time..
@@galaxies_dev hahahaha I do this for myself because in each tutorial you show some hidden gem of ionic or capacitor (probably you don't realize that, but beleive me, you do it) and I find it very useful. For example maybe you explain something about capacitor community plugins that is interesting, like the import for proper working on web, but since the tutorial is about a whole bigger thing, that comment cannot be found easily again. Timestamps help me when I need to find those kind of comments you make, or as I called them before, hidden gems :)
You should keep track of that in a document and create a hidden gem compilation 😍
@@galaxies_dev haha good idea!!
Could this be used for SSO?
Hi Simon, I'm writing to ask you a few things, I recently bought a MacBook Air M1, and compiling my project from Chrome with Ionic serve works perfectly, but when I move with Capacitor in Xcode it gives me an infinity of errors.
what does it depend on, from the fact that I have an M1, am I doing something wrong?
Thanks for the reply.
I actually don't know since I don't have M1 yet, but I heard that normally everything works fine :/ did the code previously work on another Mac?
@@galaxies_dev Sorry Simon, but I had not seen this notification so I reply a little late, I tried on an iMac with High Sierra and Xcode 10.1
and the errors remain, so I think there will be a need for a minimal version of XCode to get everything to work? At the time of writing I have Ionic 6.13
we love you
Hey Simon, great video as always! Are you planning to shoot a video with the same token interceptor but using http native instead, could that be interesting?
Yeah might do this in a future episode, good idea Stefan!
Hi Simon, thanks for this tutorial, I have a quick question. How can i get the payload of the authenticated user after successful login using the stored token?
You can always decode the token with a simple jwt package (I think angular-jwt)
Nice tuto ❤❤ . but how can i save user info when i sign in like user_id, type_user and createdBy ...
You could use Ionic Storage to store them locally!