locked
API apps vs Mobile Apps? RRS feed

  • Question

  • Hi,

    Our situation is the following: we're planning to create mobile apps (Android/iOS/WP) and also a web front-end. I'm choosing between API app vs Mobile App. I see that Mobile apps have advantages like social auth mechanisms, offline sync support etc. I have the following questions:


    - can I use mobile app backend from a regular front-end web app (e.g. angular)? What about authentification? If no, does is it mean that azure mobile app back-end is not an option for me (and everybody else who need a website with the same functionality as a web app)?

    - can I use ASP.NET 5 (MVC 6) with Azure API apps?

    - can I use ASP.NET 5 (MVC 6) with Azure Mobile apps?

    - can I target .NET Core with Azure API/Mobile apps?

    - is there an official guide how to use Swagger with ASP.NET 5 MVC 6? 

    Also, in VS2015 there are only templates for ASP.NET 4.6 with Azure API/Mobile apps integration but not for ASP.NET 5. How can you integrate their APIs into ASP.NET 5 - based app?







    Sunday, December 13, 2015 7:45 PM

Answers

  • Hi Olek,

    Disclaimer: I'm not an expert so am just speaking from my experience so far:

    API Apps now have the social media login stuff.  The top requested feature is 1st class support for custom authentication as well.  Currently it seems there is no support to modify the social media login experience - this means you cannot add your own claims - such as your own app user id.  MS are blurring mobile app and api app and web app together into some funky mixed product.  I imagine, in reality, mobile apps will be removed eventually and api apps will have a more dynamic set-up, meaning you can add that funky table access stuff in Mobile Services if you choose to.

    Yes you can use them all from javascript.  Here is a link for you that you will need, and the most important snippet:https://azure.microsoft.com/en-gb/blog/announcing-app-service-authentication-authorization/

    "Your application can trigger the same redirect itself by navigating the user to the /.auth/login/<provider> endpoint of your site, where <provider> is one of aad, facebook, google, microsoftaccount, and twitter."

    and

    "submit an HTTP POST to the same endpoint with the provider token in a JSON body under the key “access_token” (or “authenticationToken” for Microsoft Account)"

    HOWEVER - this doesn't work fully, because the gateway that the new app service sits behind generates CORS errors even when everything is fully configured and working correctly.

    I don't know about .Net Core, though the rest is perfectly fine and compatible.

    Doing swagger is trivial. Find the Nuget package, install it and you're almost done already.  There are documents online about this - it's all very straight forward.

    I would like to give a summary though.  DO NOT USE the new app service mobile apps and api apps yet.  They are very pre-release and you will run into a lot of problems and you won't get support for it yet.  For example, the whole api app integrating with logic apps thing - outright doesn't work.  Social media login: doesn't work because of aforementioned CORS error.  No hook, event or framework to control it either.  The new app service is going to be fantastic, but hold fire on using it until it's more developed.

    Wednesday, December 23, 2015 1:25 PM