❔ Xamarin Authentication
Hello everyone.
I currently have a MVC project that uses the IdentityUser base class to register/login users. I'm not manually using any kind of token.
Using the same database I wanted to Authenticate the user in Xamarin. How can I say to the Xamarin app that the User/IdentityUser logged is the one the app should keep?
Sorry if it appears too broad of a question, but would appreciate any help!
4 Replies
You're probably looking for OAuth or something similar
Or something simpler, like an app token
Assuming it'll just be your app that uses your API
Essentially, you assign each user a random token, and let them use it instead of the password when logging in via the app
Would have to store it somewhere
Sorry, regarding API authentication I'm a complete beginner. I didn't use any default Identity option in my MVC project. I am using Jwt for email confirmation on the MVC section.
For example on my MVC Startup:
On my Login for the MVC:
After this I just use User.Identity to refer to the user logged in.
On my API Controller for the Mobile:
So when I GET this response on the Mobile I want to say to the app that the user received is now the user logged in.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.