Before using the SDK, you have to create a new
OktaOidc object. You can instantiate
OktaOidc without parameters. If you do that, the SDK uses Okta.plist for configuration values. Alternatively, you can create the
OktaOidc instance with a custom configuration.
Start the authorization flow by simply calling
OktaOidc. After a successful sign-in, this operation returns a valid
OktaOidcStateManager instance in its callback:
To restore the
OktaOidcStateManager object from the iOS keychain, do the following:
- Create the
OktaOidcConfig object with the same config data that you used for the browser sign-in process.
- Call the
OktaOidcStateManager.readFromSecureStorage function and pass the
OktaOidcConfig object as a parameter: