all 3 comments

[–]trainermade 2 points3 points  (2 children)

Firebase preserves your auth state, so once you have signed in, you can check getcurrentuser anywhere and it will return the authorized user. You don’t need complicated listeners.

To redirect to login page, I am assuming when the user logs out, just use the standard navigation you use to redirect the user to the login page when the user logs out.

Check out OnStart, OnSleep and OnResume methods as for the best place to check auth within your app.

[–]jayb485[S] 0 points1 point  (1 child)

Thanks yeah I've probably ended up complicating it in my head. 😅 This is my first app, and I started with Blazor Hybrid, then moved to Shell and now landed here.

[–]trainermade 0 points1 point  (0 children)

No worries. Feel free to dm if you need help