@@barnes_specialty Came here to respond to this very question in case anyone else ran into it. Glad you figured it out on your own and even posted the answer for other's.
Another question @ 29:10 when you go to register and then cut yourself off due to time most likely, what were you going to expand on? I don't want to miss anything in this great lesson. Thanks.
Well in terms of mechanisms there is only sessions and token based auth. Firebase auth works great, otherwise I would always implement JWT auth in my API. But your own API or Firebase is a different topic, that's based on what your app needs to do.
Now that ionic storage and ionic storage angular rely on async, what would be the proper way to do this? If I do it with async it typically takes enough time to check my token that the request is made before the token loads causing it to be unauthorized.
The usage of Ionic Storage has always been async. But if you refer to the new create() function, you could add that inside the Observable as well before doing any check for the stored token!
After login and going to members page if I press back, it goes to login page but I want to disable the login page when user is logged in, how to do it?
I didnt quite catch where you should run code that you want to finish before the platform is ready and before you see the first page of the app. Could you maybe explain that again or maybe do a video on this topic, explaining what you could do before the app is ready to display and where the code for it should be placed? I think the AuthGuard is already a good place to begin right?
The platform ready event is only needed if you use native features, and calls to Ionic Storage fall into that group! That's the only magic behind that event :)
Hi, thanks for this tutorial. Making the tutorial I got these errors: ERROR Error: Uncaught (in promise): Error: Database not created. Must call create() first That I resolved adding: await this.storage.create(); into the loadStoredToken() in the Auth service But after that I got again the error: ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'pipe') when trying to navigate to /members (when not logged yet) What can I do? Is there an updated version of this tutorial? Thank you
You can add cloud functions and identify people with a JWT, but if you are using the regular Firebase auth you don't need it. Only have an external authentication system already in place!
Thanks for being a follower for so long Rahul! And yes, JWT is a decent auth mechanism used in many places these days. I've also used it in all my apps that require authentication.
Would you be able to show this same example with firebase authentication? Firebase signInWithEmailAndPassword returns a Promise, but this example is based on an Observable. How do you bridge that gap?
If you are still getting the Storage issue after watching this video, you can fix the issue by following the steps on :ionicframework.com/docs/angular/storage
Hey Simon! Congratulations for all you work, it's great to enjoy all the contents you share, I really enjoy it... Particularly I'm working in a project where I need authentication but I need to grant access and display content by user role. Do you have an idea for managing this kind of "architecture"? It would be great to hear you guiding us about it. THANKS and GO AHEAD!
Yes we have a course on the topic of different user roles inside the Ionic Academy. Also you could check out this video: th-cam.com/video/44Avd9NBf7M/w-d-xo.html
@@galaxies_dev Thank you Simon. if you find something like that, please would you share it, jajajaja , well , it could be very useful. Thinking about a scenario like this: Having four apps using the same authentication I would like to create a launching app that allows me to authenticate the user once and if the user calls any of the four apps, I will not ask him again for a username and password. And if the user uses any of the four apps independently, the app will ask for their authentication.
Are you not using Capacitor full time yet? Angular in 2019? Check Most.JS for the state it's much faster and lighter than RxJS. Would love you to do some more vanilla Capacitor tuts.
this.alertCtrl.create({ title: 'Thanks a ton sir', message: 'U rock! keep it up. That was so awesome as always!! :)' }).then(alertEl => { alertEl.present() })
This is perfect! I would love a deeper dive on the RxJS tools. You seem to understand them so much better than I do. They're SO powerful!
I only understand a fraction of them as well, but I'll definitely try to create something on that topic soon!
I can't believe how difficult I used to think routing was before I started watching your videos. thank you for simplifying everything
Happy to help!
I am grateful that you passed your knowledge to us
Awesome tutoriel..i suggest to make a video about RxJS..many thanks Simon
Bro, ha ha ha. You are very fast but unexpectedly we have slow motion option (0.25sec) in youtube. Thank you so much.
Nice tutorial. @ 15:04 line 35 VSCode tells me token is of type unknown and has a squiggly line. Why does yours show differently?
I figured it out. I was missing the storage import, but the error wasn't obvious to me.
@@barnes_specialty Came here to respond to this very question in case anyone else ran into it. Glad you figured it out on your own and even posted the answer for other's.
Thank you, I was waiting for this video
What did you do at the error at minute 24:00 ? error is persisting with mine
Since the values were declared correctly, I just restarted the ionic server command!
@@galaxies_dev I restarted it again and again. Also restarted my PC. Still having the error
@@renasance7468 U can resolve this problem?
just what I needed. Thanks!!
Another question @ 29:10 when you go to register and then cut yourself off due to time most likely, what were you going to expand on? I don't want to miss anything in this great lesson. Thanks.
I guess nothing special since register has nothing to do with JWT. Most of the time it's just a POST to your server to create the user!
can you make next video for login registration that data should fetch and post through json server
Thank you! excellent tutorial
You are welcome!
Hi Simon, nice video. I learned a lot again. I would like to know if you could make a video about the component nfc.
Yes NFC would be interesting but I haven't used it so far :/
Just like what i need, thank you simon !
Do you have a tutorial for the registration part?
can we use this method to authenticate ionic app with azure (SSO )?
Great tutorial, but I think it has a problem. If you log into the system, and then go to the main page (/), it redirects you to the login :/
thank you simon
hello simon what is the best and recommended auth method for ionic (firebase, jwt, api, or mysql)
Well in terms of mechanisms there is only sessions and token based auth. Firebase auth works great, otherwise I would always implement JWT auth in my API. But your own API or Firebase is a different topic, that's based on what your app needs to do.
Now that ionic storage and ionic storage angular rely on async, what would be the proper way to do this? If I do it with async it typically takes enough time to check my token that the request is made before the token loads causing it to be unauthorized.
The usage of Ionic Storage has always been async. But if you refer to the new create() function, you could add that inside the Observable as well before doing any check for the stored token!
After login and going to members page if I press back, it goes to login page but I want to disable the login page when user is logged in, how to do it?
You could add another Guard to the login page and prevent access to the page if a user is already authenticated!
great video! one question, to add my token on the header of the http request I need to use an interceptor right?
Either write your own interceptor or use the JWT package that automatically loads the token from storage and adds it to your requests!
there is a problem . how to secure myToken ? if someOne get my saved token and copy into his PC and access my data
I didnt quite catch where you should run code that you want to finish before the platform is ready and before you see the first page of the app. Could you maybe explain that again or maybe do a video on this topic, explaining what you could do before the app is ready to display and where the code for it should be placed? I think the AuthGuard is already a good place to begin right?
The platform ready event is only needed if you use native features, and calls to Ionic Storage fall into that group! That's the only magic behind that event :)
Need updated CRUD Sqlite Example of Ionic 4, your existing CRUD tutorial isn't working now. Please check or update the tutorial source video.
Why is it not working? I don't know about any breaking changes regarding SQL!
How to implement this with your "JWT Authentication with Ionic 4 & Node.js part 1" video?
Hi, thanks for this tutorial. Making the tutorial I got these errors:
ERROR Error: Uncaught (in promise): Error: Database not created. Must call create() first
That I resolved adding:
await this.storage.create();
into the loadStoredToken() in the Auth service
But after that I got again the error:
ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'pipe')
when trying to navigate to /members (when not logged yet)
What can I do? Is there an updated version of this tutorial?
Thank you
You can resolve this problem?
how it would be when you press Login, appears a loading spinner?? I am finding a tutorial with that but I did not find it
You can use the Ionic loading controller to create the loading overlay, and once you get back data (or a fail) from your API you can hide the loading!
Could that be used with promises instead of observables?
I don't think in the way it works right now, since the Subject is an important part of the whole logic!
Great video as always :D , how can i combine between firebase and jwt to store and authentificate the user ?
You can add cloud functions and identify people with a JWT, but if you are using the regular Firebase auth you don't need it. Only have an external authentication system already in place!
hello sir i am following you for almost three years. my questions is is jwt is secure authentication system
Thanks for being a follower for so long Rahul! And yes, JWT is a decent auth mechanism used in many places these days. I've also used it in all my apps that require authentication.
Would you be able to show this same example with firebase authentication? Firebase signInWithEmailAndPassword returns a Promise, but this example is based on an Observable. How do you bridge that gap?
You could actually transform a promise to an Observable using the from() operator if you want to!
If you are still getting the Storage issue after watching this video, you can fix the issue by following the steps on :ionicframework.com/docs/angular/storage
Thanks for adding the link Thomas!
Can you make a video to show how to create a signup system whit passport, Visa and other government papers???
Hi, when i start an ionic project, it doesn't create the app-routing file. Any tips about this problem?
Which command did you run to create the project? Normally it did this all the time!
The normal no documentation. Ionic start name. Then it ask for type and choose beetween ionic-angular and ionic1. I choose angular and ionic
Hey Simon! Congratulations for all you work, it's great to enjoy all the contents you share, I really enjoy it...
Particularly I'm working in a project where I need authentication but I need to grant access and display content by user role. Do you have an idea for managing this kind of "architecture"?
It would be great to hear you guiding us about it. THANKS and GO AHEAD!
Yes we have a course on the topic of different user roles inside the Ionic Academy. Also you could check out this video: th-cam.com/video/44Avd9NBf7M/w-d-xo.html
Hi simon, how can we share token authentication between own apps
I don't know about any way for that, in general multiple apps can't easily share anything between them (especially not like a token)
@@galaxies_dev Thank you Simon. if you find something like that, please would you share it, jajajaja , well , it could be very useful.
Thinking about a scenario like this: Having four apps using the same authentication I would like to create a launching app that allows me to authenticate the user once and if the user calls any of the four apps, I will not ask him again for a username and password. And if the user uses any of the four apps independently, the app will ask for their authentication.
@@javiermane5210 what you need is a single sign on platform... And integrate your apps with that.
Thank god signals exist
🙌
will this work with angular 5?
Yes sure :)
nice tutorial thank you.
Simonnnn!!!! Your pretty cool... 😍🤩
Are you not using Capacitor full time yet? Angular in 2019? Check Most.JS for the state it's much faster and lighter than RxJS. Would love you to do some more vanilla Capacitor tuts.
this.alertCtrl.create({
title: 'Thanks a ton sir',
message: 'U rock! keep it up. That was so awesome as always!! :)'
}).then(alertEl => {
alertEl.present()
})
while True:
print('Thank You, Simon...')
Hey Simon darf ich dir mal persönlich schreiben wenn ich eine Frage hab. :)
Yes, but if it's in here please in English so everyone can follow :)
@@galaxies_dev Alright. Nice to hear that you're that helpful :)
second
first