I have and app with a login screen. I send the user and password to a service who gives me a user object and a token.
The fact is that I need to relog on each start to refresh the user object and the token. The user object is stored as a global property and the token is stored in secure keychain with the correct user and password.
I tried to manage it in App.xaml.cs builder (public App()) but it can be awaited, resulting on the app moving to home screen faster than the login service, and trying to ask data with no user id.
Then I tried to do it in protected override async void OnStart() but it gives me weird errors, and after a lot of googling it seems it's related to not being abled to use httpclient in OnStart
At the end my current "solution" is to have a xamarin forms view with the aspect of the splash screen and a activity indicator and manage the relog service on it. But it's giving the feel of a too much time taking splash screen.
Is there any better way to do it?