Authentication Choice: Azure Mobile App SDK vs. Xamarin Auth

I am relatively new to Xamarin Cross Platform Environment. Is it better to use Xamarin Auth component to avoid an unnecessary hop (and costs) to a Azure Mobile App.

Best Answer


  • SreeSundaramSreeSundaram USMember ✭✭

    Thanks Pierce. I am already using Azure Mobile Apps to manage storage and my offline sync. In addition to agreeing with you, I am also interested in managing it client side simply to reduce my Azure charges. Is there any example you can provide wherein I can tap into the native SDK of these identity providers.

  • SreeSundaramSreeSundaram USMember ✭✭

    Thanks Lucio. But your example refers to using Azure Mobile App service which is precisely what I am trying to avoid by keeping all the authentication calls on the client side.

  • PierceBogganPierceBoggan USForum Administrator, Xamarin Team, Developer Group Leader Xamurai
    edited February 2017

    @SreeSundaram: The tricky thing is that it still requires the same number of hits to the Azure service to authenticate. The flow is something like this:

    1. Use client library to authenticate user on device.
    2. Pass authentication token from client library back to Azure (via the LoginAsync method).
    3. Azure will issue a new ZUMO token (just their version of an authentication token that's unified across different identity providers), which you use when hitting the app's backend service.

    I have written some code for doing this in the past, just need to dig it up. :smile:

  • SreeSundaramSreeSundaram USMember ✭✭

    Thanks Pierce. Please let me know when you "dig" up the code :smile: I am looking for a true cross platform solution involving iOS, Android and UWP. All of my online searches only have iOS and Android examples and no UWP :(

  • batmacibatmaci DEMember ✭✭✭✭✭

    Does Azure verify validity of the token with the provider as well? As I know AWS cognito does this. So if I am logged in, I only ask Cognito if my previous token is still valid on Facebook side using AWS token like Zumo token.
    Another question, Does Azure store User information for me, If I am logged in using facebook, does it store facebook name, picture url etc because I enable these on the backend or Do I have to create a user table and store all myself? If Azure stores it, where can I find this on Azure portal?
    Last question, is there any good sample how Authorization with ZUMO token is done?

  • batmacibatmaci DEMember ✭✭✭✭✭

    I have just spent 2 good days to understand the complicated logic behind azure. I say complicated because similar logic exist in aws cognito and it took me couple of hours to understand and implement. it is really strange way of working and for your users will be even TERRIFYING ! because you redirect your user to a page first then this page redirects you to facebook, once user logs in you are redirected from facebook back to this first page and finally land on the app. if you are on a slow connection, steps are clearly visible to user (on fast connection, it quickly skips and maybe you want see call back url). Users will fear themselves insecure in this case. If you want to use Azure, just use Facebook SDK or do simple http request using web view. this takes 15 mins to implement.

Sign In or Register to comment.