Skip to content

Instantly share code, notes, and snippets.

@dmorosinotto
Forked from joshtwist/CustomUser.cs
Created October 10, 2013 20:35
Show Gist options
  • Save dmorosinotto/6925242 to your computer and use it in GitHub Desktop.
Save dmorosinotto/6925242 to your computer and use it in GitHub Desktop.
// .NET C#
var mobileServiceClient = new MobileServiceClient("<your-app-url>", "<your-app-key>");
mobileServiceClient.CurrentUser = new MobileServiceUser("Foo:123456789");
mobileServiceClient.CurrentUser.MobileServiceAuthenticationToken = "<your-users-JWT>";
// Javascript
var client = new Microsoft.WindowsAzure.MobileServices.MobileServiceClient(
"<your-app-url>",
"<your-app-key>");
client.currentUser = {
userId: "Foo:123456789",
mobileServiceAuthenticationToken: "<your-users-JWT>"
};
// Objective C
MSClient *client = [MSClient clientWithApplicationURLString:@"<your-app-url>"
withApplicationKey:@"<your-app-key>"];
client.currentUser = [MSUser alloc] initWithUserId:@"Foo:123456789";
client.currentUser.mobileServiceAuthenticationToken = @"<your-users-JWT>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment