title | name | alias | language | hybrid | image | tags | snippets | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows Phone Tutorial |
Windows Phone |
|
|
false |
/media/platforms/windows-phone.png |
|
|
<%= include('../_includes/_package', { pkgRepo: 'Auth0.WindowsPhone', pkgBranch: 'master', pkgPath: 'examples/WindowsPhoneSilverlight', pkgFilePath: null, pkgType: 'none' }) %>
Otherwise, if you already have an existing application, please follow the steps below.
You can either run the following command or install it via the Package Manager UI.
${snippet(meta.snippets.dependencies)}
Go to the Application Settings section in the Auth0 dashboard and make sure that Allowed Callback URLs contains the following value:
https://${account.namespace}/mobile
${snippet(meta.snippets.setup)}
${snippet(meta.snippets.use)}
var client = new HttpClient();
// Accessing public resource
var response = await client.GetAsync(new Uri("{YOUR API URL}/{PUBLIC RESOURCE}"));
// Accessing secured resource
// Initialize HTTP request message
var message = new HttpRequestMessage(HttpMethod.Get, new Uri("{YOUR API URL}/{SECURED RESOURCE}"));
// Add header so that server can recognize logged in user
message.Headers.Add("Authorization", "Bearer " + App.Auth0.CurrentUser.IdToken);
response = await client.SendRequestAsync(message);
Now it's time to sit back and relax. You've implemented log in and signup with Auth0 for your Windows Phone application.
You can also check out the Github page access the source code, and additional documentation.