Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Latest commit

 

History

History
35 lines (24 loc) · 1.74 KB

README-Okta.md

File metadata and controls

35 lines (24 loc) · 1.74 KB

Using AppAuth with Okta

Since Okta is a certified OpenID Connect provider and supports PKCE by default, configuration is quick and simple. There are no additional libraries or tools required.

Add an OpenID Connect Client

You can create an Okta developer account at https://developer.okta.com/.

  1. After login, navigate to https://{{yourOrg}}-admin.oktapreview.com/admin/apps/add-app and select Create New App
  2. Choose Native as the platform, Sign on method as OpenID Connect then select Create.
  3. Populate your new OpenID Connect application with values similar to:
Setting Value
Application Name OpenId Connect App (must be unique)
Redirect URIs com.oktapreview.yoursubdomain://callback_url
Allowed grant types Authorization Code
  1. Click Finish to redirect back to the General Settings of your application.
  2. Copy the Client ID, as it will be needed for the client configuration.

Note: As with any Okta application, make sure you assign Users or Groups to the OpenID Connect Client. Otherwise, no one can use it.

The following changes are required for the AppAuth sample:

// set the issuer
// This will be your specific subdomain.okta.com or subdomain.oktapreview.com
static NSString *const kIssuer = @"https://subdomain.okta.com”;

// client ID for code flow + PKCE
// This is available from your OpenID Connect Client page
static NSString *const kClientID = @“YourClientID”;

static NSString *const kRedirectURI = @"com.oktapreview.yoursubdomain:/oauth";