Android SDK
Sign end users in through the hosted login from Android apps, with Custom Tabs, PKCE and Keystore-encrypted storage.
An Android library for minSdk 26. Dependencies: AndroidX Browser and Credentials, kotlinx-coroutines and kotlinx-serialization.
Install
Section titled “Install”implementation("com.ohauthcat:ohauthcat-android:0.0.2")- Create an
OhAuthCatClientwith aConfiguration(login origin, publishable key, redirect URI), aCustomTabsAuthenticator(and aactivity) KeystoreTokenStore(, and setcontext) manifestPlaceholders["ohauthcatRedirectScheme"]in Gradle. signIn()opens the hosted login in a Custom Tab with PKCE (S256),stateandnonce; the SDK’sRedirectActivityreceives the callback. CallonResumeWithoutRedirect(from your activity’s) onResumewhile a sign-in is pending, so a closed tab becomesCancelled.- Tokens are encrypted with an AES-256-GCM key held in the Android Keystore. Exclude the
com.ohauthcat.sdkpreferences file from backups. accessToken()refreshes once for all callers;signOut()always clears locally;switchOrganization(id)runs the hosted login again.- Passkeys in the app go through
Passkeys(.backend, CredentialManagerPasskeys( activity)) - Errors are
OhAuthCatExceptionsubclasses with the catalogue code.