Skip to content

Instantly share code, notes, and snippets.

@WilliamDenniss
Created February 20, 2016 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WilliamDenniss/941d9b2bc62d5f7ffac4 to your computer and use it in GitHub Desktop.
Save WilliamDenniss/941d9b2bc62d5f7ffac4 to your computer and use it in GitHub Desktop.
Creating an authorization request with AppAuth using the 'plain' PKCE challenge method.
// builds authentication request
NSString *state = [OIDAuthorizationRequest generateState];
NSString *codeVerifier = [OIDAuthorizationRequest generateCodeVerifier];
OIDAuthorizationRequest *request =
[[OIDAuthorizationRequest alloc] initWithConfiguration:configuration
clientId:kClientID
scope:@"openid profile"
redirectURL:redirectURI
responseType:OIDResponseTypeCode
state:state
codeVerifier:codeVerifier
codeChallenge:codeVerifier
codeChallengeMethod:@"plain"
additionalParameters:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment