Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #398 from ggailey777/zumo_weekly

#393: added remaining auth provider chunks
  • Loading branch information...
commit fcfb229bc3fa0213e23ab40a6a59c15909989535 2 parents e2c97a4 + 8f713a8
@mollybostic authored
Showing with 188 additions and 81 deletions.
  1. +5 −14 DevCenter/Mobile/Chunks/mobile-facebook-auth-steps.md
  2. +45 −0 DevCenter/Mobile/Chunks/mobile-google-auth-steps.md
  3. +11 −39 DevCenter/Mobile/Chunks/mobile-microsoft-account-auth-steps.md
  4. +65 −0 DevCenter/Mobile/Chunks/mobile-microsoft-account-full-integration-steps.md
  5. +42 −0 DevCenter/Mobile/Chunks/mobile-twitter-auth-steps.md
  6. +1 −1  DevCenter/Mobile/HowTo/mobile-services-register-for-live-connect-auth.md
  7. BIN  DevCenter/Mobile/Media/mobile-services-google-app-details.png
  8. BIN  DevCenter/Mobile/Media/mobile-services-google-create-client.png
  9. BIN  DevCenter/Mobile/Media/mobile-services-google-create-client2.png
  10. BIN  DevCenter/Mobile/Media/mobile-services-google-create-client3.png
  11. BIN  DevCenter/Mobile/Media/mobile-services-google-developers.png
  12. BIN  DevCenter/Mobile/Media/mobile-services-live-connect-add-app.png
  13. BIN  DevCenter/Mobile/Media/mobile-services-live-connect-app-details.png
  14. BIN  DevCenter/Mobile/Media/mobile-services-twitter-app-details.png
  15. BIN  DevCenter/Mobile/Media/mobile-services-twitter-developers.png
  16. BIN  DevCenter/Mobile/Media/mobile-services-twitter-register-app1.png
  17. BIN  DevCenter/Mobile/Media/mobile-services-twitter-register-app2.png
  18. +19 −27 DevCenter/Mobile/Tutorials/mobile-services-get-started-with-users-dotnet.md
View
19 DevCenter/Mobile/Chunks/mobile-facebook-auth-steps.md
@@ -1,16 +1,8 @@
-<properties linkid="register-for-facebook-auth" urldisplayname="Mobile Services" headerexpose="" pagetitle="Register your apps for Facebook authentication with Mobile Services" metakeywords="Facebook, 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 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.
-
<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 facebook.com.</p>
+<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 [Facebook Developers] web site and sign-in with your Facebook account credentials.
+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**.
@@ -20,8 +12,6 @@ This topic shows you how to register your apps to be able to use Facebook as an
![][1]
- This displays the
-
4. Choose a unique name for your app, select **OK**.
![][2]
@@ -32,7 +22,7 @@ This topic shows you how to register your apps to be able to use Facebook as an
![][3]
-6. Make a note of the value of **App ID** and **App Secret**.
+6. Make a note of the values of **App ID** and **App Secret**.
![][4]
@@ -52,7 +42,8 @@ You are now ready to integrate authentication by using Facebook into your app by
[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
45 DevCenter/Mobile/Chunks/mobile-google-auth-steps.md
@@ -0,0 +1,45 @@
+<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 integrate authentication by using Twitter into your app by providing the consumer key and consumer 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
50 DevCenter/Mobile/Chunks/mobile-microsoft-account-auth-steps.md
@@ -1,56 +1,28 @@
-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**.
+<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>
- ![][0]
+1. Navigate to the [My Applications] page in the Live Connect Developer Center, and log on with your Microsoft account, if required.
-2. Type a name for your app in **App name**, click **Reserve app name**, and then click **Save**.
+2. Click **Create application**, then type an **Application name** and click **I accept**.
- ![][1]
+ ![][1]
- This creates a new Windows Store registration for your app.
+ This registers the application with Live Connect.
-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].
+10. Make a note of the value of **Client ID** and **Client secret**.
-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]
+ ![][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>
-11. In **Redirect domain**, enter the URL of your mobile service from Step 8, and then click **Save**.
-
<!-- Anchors. -->
<!-- Images. -->
-[0]: ../Media/mobile-services-submit-win8-app.png
-[1]: ../Media/mobile-services-win8-app-name.png
-[2]: ../Media/mobile-services-store-association.png
-[3]: ../Media/mobile-services-select-app-name.png
-[4]: ../Media/mobile-services-selection.png
-[5]: ../Media/mobile-service-uri.png
-[6]: ../Media/mobile-live-connect-apps-list.png
-[7]: ../Media/mobile-live-connect-app-api-settings.png
-[8]: ../Media/mobile-services-win8-app-advanced.png
-[9]: ../Media/mobile-services-win8-app-connect-redirect.png
+[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
View
65 DevCenter/Mobile/Chunks/mobile-microsoft-account-full-integration-steps.md
@@ -0,0 +1,65 @@
+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**.
+
+<!-- Anchors. -->
+
+<!-- Images. -->
+[0]: ../Media/mobile-services-submit-win8-app.png
+[1]: ../Media/mobile-services-win8-app-name.png
+[2]: ../Media/mobile-services-store-association.png
+[3]: ../Media/mobile-services-select-app-name.png
+[4]: ../Media/mobile-services-selection.png
+[5]: ../Media/mobile-service-uri.png
+[6]: ../Media/mobile-live-connect-apps-list.png
+[7]: ../Media/mobile-live-connect-app-api-settings.png
+[8]: ../Media/mobile-services-win8-app-advanced.png
+[9]: ../Media/mobile-services-win8-app-connect-redirect.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
42 DevCenter/Mobile/Chunks/mobile-twitter-auth-steps.md
@@ -0,0 +1,42 @@
+<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 integrate authentication by using Twitter into 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/HowTo/mobile-services-register-for-live-connect-auth.md
@@ -2,7 +2,7 @@
<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 Windows Live Connect authentication with Mobile Services
+# Register your Windows Store apps for Windows Live Connect authentication
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.
View
BIN  DevCenter/Mobile/Media/mobile-services-google-app-details.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-google-create-client.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-google-create-client2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-google-create-client3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-google-developers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-live-connect-add-app.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-live-connect-app-details.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-twitter-app-details.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-twitter-developers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-twitter-register-app1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  DevCenter/Mobile/Media/mobile-services-twitter-register-app2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
46 DevCenter/Mobile/Tutorials/mobile-services-get-started-with-users-dotnet.md
@@ -116,48 +116,40 @@ Next, you will update the app to authenticate users with Live Connect before req
6. Add the following code snippet to the MainPage class:
+ private MobileServiceUser user;
private async System.Threading.Tasks.Task Authenticate()
{
- LiveAuthClient liveIdClient = new LiveAuthClient("<< INSERT REDIRECT DOMAIN HERE >>");
-
- while (session == null)
+ while (user == null)
{
- // Force a logout to make it easier to test with multiple Microsoft Accounts
- if (liveIdClient.CanLogout)
- liveIdClient.Logout();
-
- LiveLoginResult result = await liveIdClient.LoginAsync(new[] { "wl.basic" });
- if (result.Status == LiveConnectSessionStatus.Connected)
+
+ user = await App.MobileService
+ .Login(
+ MobileServiceAuthenticationProvider.Facebook);
+ if (user.UserId == null)
{
- session = result.Session;
- LiveConnectClient client = new LiveConnectClient(result.Session);
- LiveOperationResult meResult = await client.GetAsync("me");
- MobileServiceUser loginResult = await App.MobileService.LoginAsync(result.Session.AuthenticationToken);
-
- string title = string.Format("Welcome {0}!", meResult.Result["first_name"]);
- var message = string.Format("You are now logged in - {0}", loginResult.UserId);
- var dialog = new MessageDialog(message, title);
+
+ var message =
+ string.Format("You are now logged in - {0}", user.UserId);
+ var dialog = new MessageDialog(message);
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
}
else
{
- session = null;
- var dialog = new MessageDialog("You must log in.", "Login Required");
+ user = null;
+ var dialog =
+ new MessageDialog("You must log in.", "Login Required");
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
}
- }
- }
+ }
+ }
- This creates a member variable for storing the current Live Connect session and a method to handle the authentication process.
+ This creates a member variable for storing the current user and a method to handle the authentication process. The user is authenticated by using a Facebook login.
<div class="dev-callout"><b>Note</b>
- <p>This code forces a logout, when possible, to make sure that the user is prompted for credentials each time the application runs. This makes it easier to test the application with different Microsoft Accounts to ensure that the authentication is working correctly. This mechanism will only work if the logged in user does not have a connected Microsoft account.</p>
+ <p>If you are using an authentication provider other than Facebook, change the value of MobileServiceAuthenticationProvider above to the value for your provider.</p>
</div>
-
-
-7. Update string _<< INSERT REDIRECT DOMAIN HERE >>_ from the previous step with the redirect domain that was specified when setting up the app in Live Connect, in the format **https://_service-name_.azure-mobile.net/**.
8. Replace the existing **OnNavigatedTo** event handler with the handler that calls the new **Authenticate** method:
@@ -167,7 +159,7 @@ Next, you will update the app to authenticate users with Live Connect before req
RefreshTodoItems();
}
-9. Press the F5 key to run the app and sign into Live Connect with your Microsoft Account.
+9. Press the F5 key to run the app and sign into the app with your chosen authentication provider.
When you are successfully logged-in, the app should run without errors, and you should be able to query Mobile Services and make updates to data.
Please sign in to comment.
Something went wrong with that request. Please try again.