Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (43 sloc) 3.911 kb

Register your apps for Google login with Mobile Services

This topic shows you how to register your apps to be able to use Google to authenticate with Azure Mobile Services.

[AZURE.NOTE] This tutorial is about Azure Mobile Services, a solution to help you build scalable mobile applications for any platform. Mobile Services makes it easy to sync data, authenticate users, and send push notifications. This page supports the Get Started with Authentication tutorial which shows how to log users into your app. If this is your first experience with Mobile Services, please complete the tutorial Get Started with Mobile Services.

To complete the procedure in this topic, you must have a Google account that has a verified email address. To create a new Google account, go to accounts.google.com.

  1. Navigate to the Google apis website, sign-in with your Google account credentials, click Create Project, provide a Project name, then click Create.

  2. Click Consent screen, select your Email Address, enter a Product Name, then click Save.

  3. Click API & Auth, click Credentials, then click Create new Client ID.

  4. Select Web application, type your mobile service URL in Authorized JavaScript Origins, replace the generated URL in Authorized Redirect URI with the URL of your mobile service appended with the path /login/google, and then click Create client ID.

    [AZURE.NOTE] For a .NET backend mobile service published to Azure by using Visual Studio, the redirect URL is the URL of your mobile service appended with the path signin-google your mobile service as a .NET service, such as https://todolist.azure-mobile.net/signin-google.

  5. Under Client ID for web applications, make a note of the values of Client ID and Client secret.

    [AZURE.IMPORTANT] The client secret is an important security credential. Do not share this secret with anyone or distribute it with your app.

You are now ready to use a Google login for authentication in your app by providing the client ID and client secret values to Mobile Services.

Jump to Line
Something went wrong with that request. Please try again.