Android SDK
Kotlin client with encrypted token storage (Android Keystore backed), OkHttp auth-header injection, and deep-link OAuth callback ingest.
Install
dependencies {
implementation "com.kolaylogin:kolaylogin-android:0.1.0"
}Bootstrap
val kolay = KolayLogin.init(applicationContext, "https://api.kolaylogin.com")
// Sign in
val ok = kolay.signInEmailPassword("user@example.com", "…")
// Or ingest an OAuth deep link
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
intent.data?.toString()?.let { kolay.ingestDeepLink(it) }
}Attach to your requests
val req = Request.Builder()
.url("https://api.yourapp.com/me")
.apply { kolay.authHeaders().forEach { (k, v) -> addHeader(k, v) } }
.build()Native sign-ins need x-kl-client: native
Android/iOS don't persist cookies. The instance API detects native clients via the
x-kl-client header and returns the JWT in the JSON body instead. The SDK sets it for you.