Skip to content
toto edited this page Jul 1, 2014 · 1 revision
NSDictionary *gitHubConfigDict = @{ 
  kNXOAuth2AccountStoreConfigurationClientID: @"MyClientID",
  kNXOAuth2AccountStoreConfigurationSecret: @"MyClientSecret",
  kNXOAuth2AccountStoreConfigurationScope: [NSSet setWithObjects:@"user", @"repo", nil],
  kNXOAuth2AccountStoreConfigurationAuthorizeURL: [NSURL URLWithString:@"https://github.com/login/oauth/authorize"],
  kNXOAuth2AccountStoreConfigurationTokenURL: [NSURL URLWithString:@"https://github.com/login/oauth/access_token"],
  kNXOAuth2AccountStoreConfigurationRedirectURL: [NSURL URLWithString:@"git_callback://MyUrlSchema"],
  kNXOAuth2AccountStoreConfigurationTokenType: @"Bearer"
  };

[[NXOAuth2AccountStore sharedStore] setConfiguration:gitHubConfigDict
                                      forAccountType:@"GitHub"];
                                      
Clone this wiki locally