These samples show you how to add different ways to sign-in a user, called authentication workflows to your app. Each sample shows code for both implementing and testing the workflow.
These samples are designed to be built and run from the OktaClient.xcworkspace workspace. To use them outside of the workspace:
- Copy the sample folder to the desired location.
- Copy the
Sharedfolder to the same location at the same level as the sample folder. - Open the sample project in Xcode.
- Select the project and add the Okta Swift Client SDK Swift Package.
| Sample | Summary |
|---|---|
| ClassicNativeAuth Sample | Use the Okta Client SDK for Swift to add native authentication to your app that uses the classic OktaAuthSdk. |
| DeviceAuthSignIn Samples | Add sign-in using the OAuth 2.0 device authorization grant flow to your tvOS app. |
| OIDCMigration Sample | Migrate your app to the new Okta Client SDK for Swift from legacy SDKs. |
| UserPasswordSignIn Samples | Add sign-in with a username and password to a macOS app. |
| WebSignIn Samples | Add web-based sign in and single sign-on that uses the token exchange flow from the OAuth 2.0 specification with the BrowserSignin Library. |
| DirectAuthSignIn Samples | Add native sign-in and sign out that uses the Okta Direct Authentication API (EA) using the OktaDirectAuth library. |
| IdxAuthSignIn Samples | Add native sign-in and sign out that uses the Okta Identity Engine via the IDX Authentication API. |