Xamarin.Auth and web api tokens

610 Views Asked by At

I'm making calls to a Web API using a xamarin mobile app and I was wondering when receiving my authorization bearer token could I not simply store it in the xamarin.auth account store along with the user's credentials? I figured this would be a better place than say a global variable in the app. Looking for feedback and any better options. Thanks!

2

There are 2 best solutions below

0
On BEST ANSWER

In my opinion there is nothing wrong with using the account store for storing an access token (using the account properties dictionary). I did it myself on one app where I didn't have any other data to persist, so didn't have a custom data access layer.

0
On

Access tokens should not be stored. Refresh tokens are OK, but Access not. From security point of view.