Hi, I am planning to develop a simple app in Xamarin. I need to connect to the same database as my web app. Also, I want to authenticate my users against the same DB using same AppServices, etc.
Is this possible? Any helpful examples or documentation on this topic please?
5 Answer(s)
-
0
I am also interested in this.
-
0
Hi,
We don't have an example for this yet but it should be similar to use rest api from Google Chrome's postman. In order to check it, open the document <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide">https://aspnetzero.com/Documents/Development-Guide</a>, select your project's type and in the following document go to section TOKEN BASED AUTHENTICATION.
In the Xamarin app, basically, first you need to get an access token as explained in TOKEN BASED AUTHENTICATION section of above document.
Then, in your each reqeust from Xamarin app to rest api, include this token just like the example abo shows for postman to retrieve user list.
Thanks.
-
0
Ah great. So I can authenticate my users through the framework WebApi Controllers? So I wont re-create any code, just use the existing?
-
0
Hi,
Yes, it should work in that way.
-
0
Thanks I will give it a try some time soon.