Xamarin.Forms Social Authentication with Azure Mobile Services – Part 1

In these series I’ll show you how to integrate your Xamarin.Forms app with Azure Mobile Services. The goals are:

  1. Setup the project
  2. Authenticate the user using social networks
  3. Get extra information from the user

This is a rather extensive article/tutorial, so it will be written in three parts. Each part will go over one goal, you can find part two here and part three here.

Setup the project

First things first!

In order to follow this tutorial you need your Azure Mobile Services App Url and Key. You also need to configure the services you are going to use like Facebook, Google+ and Twitter. I won’t be discussing that here, since that’s extremely well documented here. For this tutorial you only need to go through the first subject Register your app for authentication and configure App Services. After you’re done with that subject you will have your login services and also Azure Mobile Services ready to go. At this moment we won’t need anything else from Azure, only the App Url and Key, so remember to grab those. Later on the third part of this article we’ll need to go back to Azure, though.

Before we begin we need to add Azure Mobile Services library and its dependecies. To do that, we can use Xamarin’s store for iOS and Android projects:

  1. Right click the folder Components and select Get more components
  2. Search for “azure mobile services” and select it
  3. Click Add to App

For the WP project we need to go to the nuget manager:

  1. Right click the References node and select Manage nuget packages
  2. Search for “windows azure” and install Windows Azure Mobile Services package

Alrighty! That’s it for this article, if you’re in the mood, be sure to check part two now!


Final project on GitHub


Leave a Reply

Your email address will not be published. Required fields are marked *