Maybe it’s too soon and there’s nothing like this out there yet, but I’d really love to see a tutorial/example of an app built with the Ionic PWA Toolkit that has auth… but not firebase/okta/other auth library.
I’ve looked at the Stencil Beer app: https://github.com/jgw96/stencil-beer – But that uses firebase, and it just shows a login screen first by default, if you go directly to other routes it doesn’t redirect to login.
The app I’m creating uses the Ionic PWA toolkit with a split pane UI. But I’d like to require authentication before getting to that point. I have an existing API that I’ll be calling for authentication… so I won’t be using firebase/okta or any other auth provider. I guess my questions are: how can the user state be shared among all pages; can the auth check happen in the root component, or does it need to happen in each “page” component.
I don’t understand this statement? The inner workings of your authentication service shouldn’t matter in the application, it really comes down to implementation of the service in the application
I would recommend using a state management library like ngrx or mobx, however this can also be implemented using a custom authentication provider with observables
Thanks for the responses, can’t wait to take a look later on. As for why I said no firebase it’s just because I have to authenticate against an existing API/database. Maybe I’m misunderstanding the firebase library, can you use it to hit any oauth API server? I assumed it was only for using firebase services
Thanks man, this simple comment and your example app above definitely turned the lightbulb on. I knew there would be a simple answer/approach.
As an aside, I’ve popped in and out of this community for several years… just dipping my toes in the water at each major release pretty much. You have been absolutely killing it here every time I look for help; so thank you, I seriously appreciate it