<commit_before>---
layout: post
title: "Using the WebAuthenticationBroker for Salesforce Authentication on Windows 8"
description: ""
categories:
- Salesforce
- Force.com
- rest api
- Toolkit
- Windows 8
- OAuth
- WebAuthenticationBroker
tags: []
---
{% include setup %}

Two days ago I published a [sample app for Windows Phone 8](http://www.wadewegner.com/2014/01/connecting-to-salesforce-from-a-windows-phone-8-app/) that demonstrats how to authenticate users and make calls against the Force.com REST API using the [Salesforce Toolkits for .NET](http://www.wadewegner.com/2014/01/announcing-the-salesforce-toolkits-for-net/). The next obvious step was to build a sample application for Windows 8. **ACHIEVEMENT UNLOCKED!**

![Windows 8 Sample App](https://f.cloud.github.com/assets/746259/2053351/87effd60-8aa6-11e3-8e22-a33dd8b33bc2.png)

You can get the sample here: [https://github.com/developerforce/Force.com-Toolkit-for-NET/tree/master/samples/Windows8OAuth](https://github.com/developerforce/Force.com-Toolkit-for-NET/tree/master/samples/Windows8OAuth).

To get authentication working in Windows 8 we'll use the <span class="inline-code">WebAuthenticationBroker</span>, which manages the asynchronous authentication operation in a modal dialog window. First, the user is asked to login. This is nothing more than *secured* browser control that renders the Salesforce login page.
<commit_msg>New post on Windows 8 sample<commit_after>---
layout: post
title: "Using the WebAuthenticationBroker for Salesforce Authentication on Windows 8"
description: ""
categories:
- Salesforce
- Force.com
- rest api
- Toolkit
- Windows 8
- OAuth
- WebAuthenticationBroker
tags: []
---
{% include setup %}

Two days ago I published a [sample app for Windows Phone 8](http://www.wadewegner.com/2014/01/connecting-to-salesforce-from-a-windows-phone-8-app/) that demonstrates how to authenticate users and make calls against the Force.com REST API using the [Salesforce Toolkits for .NET](http://www.wadewegner.com/2014/01/announcing-the-salesforce-toolkits-for-net/). The next obvious step was to build a sample application for Windows 8. **ACHIEVEMENT UNLOCKED!**

![Windows 8 Sample App](https://f.cloud.github.com/assets/746259/2053351/87effd60-8aa6-11e3-8e22-a33dd8b33bc2.png)

You can get the sample here: [https://github.com/developerforce/Force.com-Toolkit-for-NET/tree/master/samples/Windows8OAuth](https://github.com/developerforce/Force.com-Toolkit-for-NET/tree/master/samples/Windows8OAuth).

To get authentication working in Windows 8 we'll use the <span class="inline-code">WebAuthenticationBroker</span>, which manages the asynchronous authentication operation in a modal dialog window. First, the user is asked to login. This is nothing more than *secured* browser control that renders the Salesforce login page.

{'fraction_non_alphanumeric': 0.10709219858156029, 'fraction_numerical': 0.03723404255319149, 'mean_word_length': 4.852697095435684, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 6, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '835780', 'n_tokens_mistral': 921, 'n_tokens_neox': 832, 'n_words': 263}