Authentication Issues with Windows Azure Mobile Services

Authentication Issues with Windows Azure Mobile Services

Here are just a couple of gotchas I ran into whilst setting up a Windows Azure Mobile Service to accept login requests from all four providers: Microsoft Account, Facebook, Twitter, Google.

Firstly, grab the site url for your mobile service – On the Dashboard tab the “Mobile Service Url” is on the right under “quick glance”

image

 

Microsoft Account (Instructions)

image

– The name of my application contained words that weren’t allowed. This includes trademarked words such as “Windows Phone”. Unfortunately this meant that when I attempted to set the Redirect URI  and hit Save, nothing appears to happen – the error is not visible as it’s on a different tab. Solution was to change the Application name, then hey presto it works.

 

Google (Instructions)

image

– Make sure you set the type to Web application

– When I created the client id I could only set the site/hostname. You actually need to go back and edit the settings to set the redirect uri to “https://[your mobile service].azure-mobile.net/login/google (note the /login/google at the end)

 

Facebook

image

– Check the website with Facebook login, and specify the site URL

 

Twitter

image

– You need to specify both the website url and the callback uri

 

Hopefully this helps someone get up and running in less time than it took me!