Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

#415: gave up on chunks and now try to link from get started with aut…

…h to individual login topics
  • Loading branch information...
commit d86971600864415a4f67a60a28cbea229aad929c 1 parent 6ebace5
@ggailey777 ggailey777 authored
View
37 DevCenter/Mobile/HowTo/mobile-microsoft-account-auth-steps.md
@@ -0,0 +1,37 @@
+<div class="dev-callout"><b>Note</b>
+<p>When you intend to also provide single sign-on or push notifications from a Windows Store app, consider also registering your app with the Windows Store. For more information, see <a href="/en-us/develop/mobile/howto/register-for-live-connect-auth">Register your Windows Store apps for Windows Live Connect authentication</a>.</p>
+</div>
+
+1. Navigate to the [My Applications] page in the Live Connect Developer Center, and log on with your Microsoft account, if required.
+
+2. Click **Create application**, then type an **Application name** and click **I accept**.
+
+ ![][1]
+
+ This registers the application with Live Connect.
+
+10. Make a note of the value of **Client ID** and **Client secret**.
+
+ ![][2]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The client secret is an important security credential. Do not share the client secret with anyone or distribute it with your app.</p>
+ </div>
+
+<!-- Anchors. -->
+
+<!-- Images. -->
+[1]: ../Media/mobile-services-live-connect-add-app.png
+[2]: ../Media/mobile-services-live-connect-app-details.png
+
+<!-- URLs. -->
+[Single sign-on for Windows Store apps by using Live Connect]: ./mobile-services-single-sign-on-win8-dotnet.md
+[Submit an app page]: http://go.microsoft.com/fwlink/p/?LinkID=266582
+[My Applications]: http://go.microsoft.com/fwlink/p/?LinkId=262039
+[Get started with Mobile Services]: ./mobile-services-get-started.md
+[Get started with authentication]: ./mobile-services-get-started-with-users-dotnet.md
+[Get started with push notifications]: ./mobile-services-get-started-with-push-dotnet.md
+[Authorize users with scripts]: ./mobile-services-authorize-users-dotnet.md
+[JavaScript and HTML]: ./mobile-services-get-started-with-users-js.md
+[WindowsAzure.com]: http://www.windowsazure.com/
+[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
39 ...wTo/mobile-services-register-for-facebook-auth.md → ...e/HowTo/mobile-services-register-facebook-auth.md
@@ -4,9 +4,41 @@
# Register your apps for Facebook authentication with Mobile Services
-This topic shows you how to register your apps to be able to use Facebook as an authentication provider Windows Azure Mobile Services.
+This topic shows you how to register your apps to be able to use Facebook to authenticate with Windows Azure Mobile Services.
-<!-- Stick the reference to chunk here -->
+<div class="dev-callout"><b>Note</b>
+<p>To complete the procedure in this topic, you must have a Facebook account that has a verified email address and a mobile phone number. To create a new Facebook account, go to <a href="http://go.microsoft.com/fwlink/p/?LinkId=268285" target="_blank">facebook.com</a>.</p>
+</div>
+
+1. Navigate to the [Facebook Developers] web site and sign-in with your Facebook account credentials.
+
+2. (Optional) If you have not already registered, click **Register Now** button, accept the policy, provide any and then click **Done**.
+
+ ![][0]
+
+3. Click **Apps**, then click **Create New App**.
+
+ ![][1]
+
+4. Choose a unique name for your app, select **OK**.
+
+ ![][2]
+
+ This registers the app with Facebook
+
+5. Under **Select how your app integrates with Facebook**, expand **Website with Facebook Login**, type the URL of your mobile service in **Site URL**, and then click **Save Changes**.
+
+ ![][3]
+
+6. Make a note of the values of **App ID** and **App Secret**.
+
+ ![][4]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The app secret is an important security credential. Do not share this secret with anyone or distribute it with your app.</p>
+ </div>
+
+You are now ready to use a Facebook login for authentication in your app by providing the App ID and App Secret values to Mobile Services.
<!-- Anchors. -->
@@ -18,7 +50,8 @@ This topic shows you how to register your apps to be able to use Facebook as an
[4]: ../Media/mobile-services-facebook-completed.png
<!-- URLs. -->
-[Facebook Developers]: http://developer.facebook.com
+[facebook.com]: http://go.microsoft.com/fwlink/p/?LinkId=268285
+[Facebook Developers]: http://go.microsoft.com/fwlink/p/?LinkId=268286
[Get started with authentication]: ./mobile-services-get-started-with-users-dotnet.md
[WindowsAzure.com]: http://www.windowsazure.com/
[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
48 ...mobile-services-register-for-live-connect-auth.md → ...To/mobile-services-register-for-single-sign-in.md
@@ -2,11 +2,53 @@
<div class="umbMacroHolder" title="This is rendered content from macro" onresizestart="return false;" umbpageid="14798" ismacro="true" umb_chunkname="MobileArticleLeft" umb_chunkpath="devcenter/Menu" umb_macroalias="AzureChunkDisplayer" umb_hide="0" umb_modaltrigger="" umb_chunkurl="" umb_modalpopup="0"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
-# Register your Windows Store apps for Windows Live Connect authentication
+# Register your Windows Store apps to use Windows Live Connect single sign-on
-This topic shows you how to register your apps to be able to use Live Connect as an authentication provider for Windows Azure Mobile Services.
+This topic shows you how to register your Windows Store apps to be able to use Live Connect for single sign-on as the identity provider for Windows Azure Mobile Services. This step is also required to use push notifications.
-<!-- Stick the reference to chunk here -->
+<div class="dev-callout"><b>Note</b>
+<p>when your Windows Store app does not require single sign-on or push notifications, consider also registering your app with the Windows Store. For more information, see <a href="/en-us/develop/mobile/howto/register-ms-account-auth">Register your Windows Store apps to use a Microsoft Account login</a>.</p>
+</div>
+
+1. If you have not already registered your app, navigate to the [Submit an app page] at the Dev Center for Windows Store apps, log on with your Microsoft Account, and then click **App name**.
+
+ ![][0]
+
+2. Type a name for your app in **App name**, click **Reserve app name**, and then click **Save**.
+
+ ![][1]
+
+ This creates a new Windows Store registration for your app.
+
+3. In Visual Studio 2012 Express for Windows 8, open the project that you created when you completed the tutorial [Get started with Mobile Services].
+
+4. In solution explorer, right-click the project, click **Store**, and then click **Associate App with the Store...**.
+
+ ![][2]
+
+ This displays the **Associate Your App with the Windows Store** Wizard.
+
+5. In the wizard, click **Sign in** and then login with your Microsoft account.
+
+6. Select the app that you registered in step 2, click **Next**, and then click **Associate**.
+
+ ![][3]
+
+ This adds the required Windows Store registration information to the application manifest.
+
+9. Navigate to the [My Applications] page in the Live Connect Developer Center and click on your app in the **My applications** list.
+
+ ![][6]
+
+10. Click **Edit settings**, then **API Settings** and make a note of the value of **Client secret**.
+
+ ![][7]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The client secret is an important security credential. Do not share the client secret with anyone or distribute it with your app.</p>
+ </div>
+
+11. In **Redirect domain**, enter the URL of your mobile service from Step 8, and then click **Save**.
You are now ready to integrate authentication by using Live Connect into your app. Mobile Services provides the following two methods for authenticating users by using Live Connect:
View
53 DevCenter/Mobile/HowTo/mobile-services-register-google-auth.md
@@ -0,0 +1,53 @@
+<properties linkid="register-google-auth" urldisplayname="Mobile Services" headerexpose="" pagetitle="Register your apps for Google login with Mobile Services" metakeywords="Google, mobile devices, Windows Azure, mobile, authentication" footerexpose="" metadescription="Windows Developer Preview registration steps for Mobile Services using Windows Azure Mobile Services in your Windows Store apps." umbraconavihide="0" disquscomments="1"></properties>
+
+<div class="umbMacroHolder" title="This is rendered content from macro" onresizestart="return false;" umbpageid="14798" ismacro="true" umb_chunkname="MobileArticleLeft" umb_chunkpath="devcenter/Menu" umb_macroalias="AzureChunkDisplayer" umb_hide="0" umb_modaltrigger="" umb_chunkurl="" umb_modalpopup="0"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
+
+# 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 Windows Azure Mobile Services.
+
+<div class="dev-callout"><b>Note</b>
+<p>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 <a href="http://go.microsoft.com/fwlink/p/?LinkId=268302" target="_blank">accounts.google.com</a>.</p>
+</div>
+
+1. Navigate to the [Google apis] web site, sign-in with your Google account credentials, and then click **Create project...**.
+
+ ![][1]
+
+2. Click **API Access** and then click **Create an OAuth 2.0 client ID...**.
+
+ ![][2]
+
+3. Under **Branding Information**, type your **Product name**, then click **Next**.
+
+ ![][3]
+
+4. Under **Client ID Settings**, select **Web application**, type your mobile service URL in **Your site or hostname**, click **more options**, add your mobile service URL to the list of **Authorized Redirect URIs**, and then click **Create client ID**.
+
+ ![][4]
+
+6. Under **Client ID for web applications**, make a note of the values of **Client ID** and **Client secret**.
+
+ ![][5]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The client secret is an important security credential. Do not share this secret with anyone or distribute it with your app.</p>
+ </div>
+
+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.
+
+<!-- Anchors. -->
+
+<!-- Images. -->
+[1]: ../Media/mobile-services-google-developers.png
+[2]: ../Media/mobile-services-google-create-client.png
+[3]: ../Media/mobile-services-google-create-client2.png
+[4]: ../Media/mobile-services-google-create-client3.png
+[5]: ../Media/mobile-services-google-app-details.png
+
+<!-- URLs. -->
+[accounts.google.com]: http://go.microsoft.com/fwlink/p/?LinkId=268302
+[Google apis]: http://go.microsoft.com/fwlink/p/?LinkId=268303
+[Get started with authentication]: ./mobile-services-get-started-with-users-dotnet.md
+[WindowsAzure.com]: http://www.windowsazure.com/
+[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
47 DevCenter/Mobile/HowTo/mobile-services-register-ms-account-auth.md
@@ -0,0 +1,47 @@
+<properties linkid="register-ms-account-auth" urldisplayname="Mobile Services" headerexpose="" pagetitle="Register your apps for Microsoft Live Connect authentication with Mobile Services" metakeywords="Microsoft Account, mobile devices, Windows Azure, mobile, authentication" footerexpose="" metadescription="Windows Live Connect registration steps for Mobile Services using Windows Azure Mobile Services in your Windows Store apps." umbraconavihide="0" disquscomments="1"></properties>
+
+<div class="umbMacroHolder" title="This is rendered content from macro" onresizestart="return false;" umbpageid="14798" ismacro="true" umb_chunkname="MobileArticleLeft" umb_chunkpath="devcenter/Menu" umb_macroalias="AzureChunkDisplayer" umb_hide="0" umb_modaltrigger="" umb_chunkurl="" umb_modalpopup="0"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
+
+# Register your Windows Store apps to use a Microsoft Account login
+
+This topic shows you how to register your apps to be able to use Live Connect as an authentication provider for Windows Azure Mobile Services.
+
+<div class="dev-callout"><b>Note</b>
+<p>When you intend to also provide single sign-on or push notifications from a Windows Store app, consider also registering your app with the Windows Store. For more information, see <a href="/en-us/develop/mobile/howto/register-for-live-connect-auth">Register your Windows Store apps for Windows Live Connect authentication</a>.</p>
+</div>
+
+1. Navigate to the [My Applications] page in the Live Connect Developer Center, and log on with your Microsoft account, if required.
+
+2. Click **Create application**, then type an **Application name** and click **I accept**.
+
+ ![][1]
+
+ This registers the application with Live Connect.
+
+10. Make a note of the value of **Client ID** and **Client secret**.
+
+ ![][2]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The client secret is an important security credential. Do not share the client secret with anyone or distribute it with your app.</p>
+ </div>
+
+You are now ready to use a Microsoft Account for authentication in your app by providing the client ID and client secret values to Mobile Services.
+
+<!-- Anchors. -->
+
+<!-- Images. -->
+[1]: ../Media/mobile-services-live-connect-add-app.png
+[2]: ../Media/mobile-services-live-connect-app-details.png
+
+<!-- URLs. -->
+[Single sign-on for Windows Store apps by using Live Connect]: ./mobile-services-register-for-single-sign-in.md
+[Submit an app page]: http://go.microsoft.com/fwlink/p/?LinkID=266582
+[My Applications]: http://go.microsoft.com/fwlink/p/?LinkId=262039
+[Get started with Mobile Services]: ./mobile-services-get-started.md
+[Get started with authentication]: ./mobile-services-get-started-with-users-dotnet.md
+[Get started with push notifications]: ./mobile-services-get-started-with-push-dotnet.md
+[Authorize users with scripts]: ./mobile-services-authorize-users-dotnet.md
+[JavaScript and HTML]: ./mobile-services-get-started-with-users-js.md
+[WindowsAzure.com]: http://www.windowsazure.com/
+[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
50 DevCenter/Mobile/HowTo/mobile-services-register-twitter-auth.md
@@ -0,0 +1,50 @@
+<properties linkid="register-twitter-auth" urldisplayname="Mobile Services" headerexpose="" pagetitle="Register your apps for Twitter login with Mobile Services" metakeywords="Twitter, mobile devices, Windows Azure, mobile, authentication" footerexpose="" metadescription="Windows Developer Preview registration steps for Mobile Services using Windows Azure Mobile Services in your Windows Store apps." umbraconavihide="0" disquscomments="1"></properties>
+
+<div class="umbMacroHolder" title="This is rendered content from macro" onresizestart="return false;" umbpageid="14798" ismacro="true" umb_chunkname="MobileArticleLeft" umb_chunkpath="devcenter/Menu" umb_macroalias="AzureChunkDisplayer" umb_hide="0" umb_modaltrigger="" umb_chunkurl="" umb_modalpopup="0"><!-- startUmbMacro --><span><strong>Azure Chunk Displayer</strong><br />No macro content available for WYSIWYG editing</span><!-- endUmbMacro --></div>
+
+# Register your apps for Twitter login with Mobile Services
+
+This topic shows you how to register your apps to be able to use Twitter to authenticate with Windows Azure Mobile Services.
+
+<div class="dev-callout"><b>Note</b>
+<p>To complete the procedure in this topic, you must have a Twitter account that has a verified email address. To create a new Twitter account, go to <a href="http://go.microsoft.com/fwlink/p/?LinkID=268287" target="_blank">twitter.com</a>.</p>
+</div>
+
+1. Navigate to the [Twitter Developers] web site, sign-in with your Twitter account credentials, and then click **Create an app**.
+
+ ![][1]
+
+2. Type the **Name**, **Description**, and **Website** for your app, and type the URL of the mobile service in **Callback URL**.
+
+ ![][2]
+
+3. At the bottom the page, read and accept the terms, type the correct CAPTCHA words, and then click **Create your Twitter application**.
+
+ ![][3]
+
+ This reigsters the app displays the application details.
+
+6. Make a note of the values of **Consumer key** and **Consumer secret**.
+
+ ![][4]
+
+ <div class="dev-callout"><b>Security Note</b>
+ <p>The consumer secret is an important security credential. Do not share this secret with anyone or distribute it with your app.</p>
+ </div>
+
+You are now ready to use a Twitter login for authentication in your app by providing the consumer key and consumer secret values to Mobile Services.
+
+<!-- Anchors. -->
+
+<!-- Images. -->
+[1]: ../Media/mobile-services-twitter-developers.png
+[2]: ../Media/mobile-services-twitter-register-app1.png
+[3]: ../Media/mobile-services-twitter-register-app2.png
+[4]: ../Media/mobile-services-twitter-app-details.png
+
+<!-- URLs. -->
+[twitter.com]: http://go.microsoft.com/fwlink/p/?LinkId=268287
+[Twitter Developers]: http://go.microsoft.com/fwlink/?LinkId=268300
+[Get started with authentication]: ./mobile-services-get-started-with-users-dotnet.md
+[WindowsAzure.com]: http://www.windowsazure.com/
+[Windows Azure Management Portal]: https://manage.windowsazure.com/
View
2  DevCenter/Mobile/Tutorials/mobile-services-get-started-with-data-ios.md
@@ -269,4 +269,4 @@ Next, try one of these other iOS tutorials:
[Management Portal]: https://manage.windowsazure.com/
[Install Xcode]: https://go.microsoft.com/fwLink/p/?LinkID=266532
[Mobile Services iOS SDK]: https://go.microsoft.com/fwLink/p/?LinkID=266533
-[Developer Code Samples site]: http://go.microsoft.com/fwlink/?LinkId=262308
+[Developer Code Samples site]: http://go.microsoft.com/fwlink/p/?LinkId=268622
View
53 DevCenter/Mobile/Tutorials/mobile-services-get-started-with-users-dotnet.md
@@ -20,15 +20,8 @@ This tutorial walks you through these basic steps to enable authentication in yo
This tutorial is based on the Mobile Services quickstart. You must also first complete the tutorial [Get started with Mobile Services].
-Mobile Services currently supports the following identity providers for authentication:
-
-- Microsoft Live Connect
-- Facebook
-- Twitter
-- Google
-
<div class="dev-callout"><b>Note</b>
- <p>This tutorial demonstrates the basic method provided by Mobile Services to authenticate users by using a variety of identity providers. This method is easy to configure and supports multiple providers. However, this method also requires users to log-in every time your app starts. To instead use Live Connect to provide a single sign-on experience in your Windows Store app, see the topic <a href="/en-us/develop/mobile/tutorials/get-started">Single sign-on for Windows Store apps by using Live Connect</a>.</p>
+ <p>This tutorial demonstrates the basic method provided by Mobile Services to authenticate users by using a variety of identity providers. This method is easy to configure and supports multiple providers. However, this method also requires users to log-in every time your app starts. To instead use Live Connect to provide a single sign-on experience in your Windows Store app, see the topic <a href="/en-us/develop/mobile/tutorials/single-sign-on-win8-dotnet">Single sign-on for Windows Store apps by using Live Connect</a>.</p>
</div>
<a name="register"></a><h2><span class="short-header">Register your app</span>Register your app for authentication and configure Mobile Services</h2>
@@ -45,44 +38,12 @@ To be able to authenticate users, you must register your app with an identity pr
You may need to provide this value to the identity provider when you register your app.
-3. Expand your chosen identity provider and follow the steps to register your app with the provider.
-
- <div class="dev-callout-new-collapsed">
- <strong>Microsoft Live Connect<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Microsoft Account.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Facebook<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Facebook login.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Twitter<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Twitter login.</p>
- <!-- start copied HTML source -->
-
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Google<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Google login.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
+3. Choose a supported identity provider from the list below and follow the steps to register your app with that provider:
+
+ - <a href="/en-us/develop/mobile/howto/register-ms-account-auth" target="_blank">Microsoft Account</a>
+ - <a href="/en-us/develop/mobile/howto/register-facebook-auth" target="_blank">Facebook login</a>
+ - <a href="/en-us/develop/mobile/howto/register-twitter-auth" target="_blank">Twitter login</a>
+ - <a href="/en-us/develop/mobile/howto/register-google-auth" target="_blank">Google login</a>
4. Back in the Management Portal, click the **Identity** tab, enter the app identifier and shared secret values obtained from your identity provider, and click **Save**.
View
74 DevCenter/Mobile/Tutorials/mobile-services-get-started-with-users-js.md
@@ -20,15 +20,8 @@ This tutorial walks you through these basic steps to enable authentication in yo
This tutorial is based on the Mobile Services quickstart. You must also first complete the tutorial [Get started with Mobile Services].
-Mobile Services currently supports the following identity providers for authentication:
-
-- Microsoft Live Connect
-- Facebook
-- Twitter
-- Google
-
<div class="dev-callout"><b>Note</b>
- <p>This tutorial demonstrates the basic method provided by Mobile Services to authenticate users by using a variety of identity providers. This method is easy to configure and supports multiple providers. However, this method also requires users to log-in every time your app starts. To instead use Live Connect to provide a single sign-on experience in your Windows Store app, see the topic <a href="/en-us/develop/mobile/tutorials/get-started">Single sign-on for Windows Store apps by using Live Connect</a>.</p>
+ <p>This tutorial demonstrates the basic method provided by Mobile Services to authenticate users by using a variety of identity providers. This method is easy to configure and supports multiple providers. However, this method also requires users to log-in every time your app starts. To instead use Live Connect to provide a single sign-on experience in your Windows Store app, see the topic <a href="/en-us/develop/mobile/tutorials/single-sign-on-win8-js">Single sign-on for Windows Store apps by using Live Connect</a>.</p>
</div>
<a name="register"></a><h2><span class="short-header">Register your app</span>Register your app for authentication and configure Mobile Services</h2>
@@ -45,44 +38,12 @@ To be able to authenticate users, you must register your app with an identity pr
You may need to provide this value to the identity provider when you register your app.
-3. Expand your chosen identity provider and follow the steps to register your app with the provider.
-
- <div class="dev-callout-new-collapsed">
- <strong>Microsoft Live Connect<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Microsoft Account.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Facebook<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Facebook login.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Twitter<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Twitter login.</p>
- <!-- start copied HTML source -->
-
- <!-- end copied HTML source -->
- </div>
- </div>
-
- <div class="dev-callout-new-collapsed">
- <strong>Google<span>Click to expand</span></strong>
- <div class="dev-callout-content">
- <p>Use the following procedure to register your app for authentication by using a Google login.</p>
- <!-- start copied HTML source -->
- <!-- end copied HTML source -->
- </div>
- </div>
+3. Choose a supported identity provider from the list below and follow the steps to register your app with that provider:
+
+ - <a href="/en-us/develop/mobile/howto/register-ms-account-auth" target="_blank">Microsoft Account</a>
+ - <a href="/en-us/develop/mobile/howto/register-facebook-auth" target="_blank">Facebook login</a>
+ - <a href="/en-us/develop/mobile/howto/register-twitter-auth" target="_blank">Twitter login</a>
+ - <a href="/en-us/develop/mobile/howto/register-google-auth" target="_blank">Google login</a>
4. Back in the Management Portal, click the **Identity** tab, enter the app identifier and shared secret values obtained from your identity provider, and click **Save**.
@@ -124,16 +85,21 @@ Next, you will update the app to authenticate users with Live Connect before req
5. In the **app.OnActivated** method overload, replace the call to the **refreshTodoItems** method with the following code:
+ var userId = null;
+
// Request authentication from Mobile Services using a Facebook login.
var login = function () {
return new WinJS.Promise(function (complete) {
- client.login("facebook").done(function (results) {
- var mobileServiceUser = results[0];
+ client.login("facebook").done(function (results) {;
+ userId = results.userId;
refreshTodoItems();
- var message = "You are now logged in as: "
- + mobileServicesUser.userId;
- var dialog =
- new Windows.UI.Popups.MessageDialog(message);
+ var message = "You are now logged in as: " + userId;
+ var dialog = new Windows.UI.Popups.MessageDialog(message);
+ dialog.showAsync().done(complete);
+ }, function (error) {
+ userId = null;
+ var dialog = new Windows.UI.Popups
+ .MessageDialog("An error occurred during login", "Login Required");
dialog.showAsync().done(complete);
});
});
@@ -191,6 +157,10 @@ In the next tutorial, [Authorize users with scripts], you will take the user ID
[16]: ../Media/mobile-add-reference-live-js.png
<!-- URLs. -->
+[Microsoft Account login]: ../HowTo/mobile-services-register-ms-account-auth.md
+[Facebook login]: ../HowTo/mobile-services-register-facebook-auth.md
+[Twitter login]: ../HowTo/mobile-services-register-twitter-auth.md
+[Google login]: ../HowTo/mobile-services-register-google-auth.md
[Submit an app page]: http://go.microsoft.com/fwlink/p/?LinkID=266582
[My Applications]: http://go.microsoft.com/fwlink/p/?LinkId=262039
[Live SDK for Windows]: http://go.microsoft.com/fwlink/p/?LinkId=262253
Please sign in to comment.
Something went wrong with that request. Please try again.