iOS/iPadOS - Native Apps
Use this page to implement Clever SSO in a native iOS app with Universal Links.
Custom URL schemes are not recommendedIf your app uses custom URL schemes to launch on iOS, update your implementation to use Universal Links instead.
To learn more about custom URL schemes, see https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app.
Overview
If you have a native iOS app, use Universal Links for Clever SSO.
Universal Links let iOS open your native app when a user navigates to one of your URLs on a mobile device. If your app is not installed, iOS opens that URL in the browser instead.
To support Universal Links, register your domain in your app entitlements and host the required JSON verification file on that domain.
For Apple’s implementation details, see:
Clever iOS SDKThe Clever iOS SDK is deprecated and is not required to implement Log in with Clever in a native iOS app.
To migrate from the SDK-based flow, see Log in with Clever ("LIWC") iOS Update.
SSO from the Clever Portal
Use this flow when the user starts in the Clever Portal and selects your application.
- The user selects your app icon in the Clever Portal.
- Clever redirects the user to your primary redirect URL with the standard authentication parameters.
- Because your redirect URL is registered as a Universal Link, iOS opens your native app and passes the authorization code to it.
- Your native app sends the authorization code to your server.
- Your server exchanges the authorization code for a token and determines which account to sign in.
- Your server returns the information your app needs to start an authenticated session.
SSO from a Log in with Clever button
Use this flow when the user starts from a "Log in with Clever" button inside your native app.
Updated LIWC flow for iOSThe original iOS SDK flow is deprecated in response to Apple’s authentication guidance.
For migration details, see Log in with Clever ("LIWC") iOS Update.
- The user selects the "Log in with Clever" option from your app’s login page.
- Your app opens an in-app web view that starts the Clever authentication flow.
- After authentication, Clever redirects the user to a URL that you have registered as a Universal Link.
- Your native app receives the authorization code from that redirect.
- Your native app sends the authorization code to your server.
- Your server exchanges the code for a token, identifies the correct user account, and returns the session information your app needs.
Updated 19 days ago
