
Enables seamless communication with OAuth 2.0 and OpenID Connect providers through an abstraction layer around AppAuth SDKs, supporting authentication, token management, and automatic token refresh.
Kotlin Multiplatform authentication for OAuth 2.0 and OpenID Connect. This repo provides a shared API over the Android AppAuth and iOS AppAuth SDKs so you can use one codebase on both platforms.
| Module | Maven artifact | Description |
|---|---|---|
| kmmOpenId | io.github.the-best-is-best:kapp-auth:7.0.0 |
Core KMP auth library. No UI — use from shared logic (ViewModels, etc.) and wire to native or Compose UI. |
| kappAuthCMP | io.github.the-best-is-best:kapp-auth-cmp:7.0.0 |
Optional Compose Multiplatform helpers (RememberAuthOpenId, RememberLogoutOpenId) for shared UI. Depends on kmmOpenId. |
commonMain.:simple:simpleKMPPorject — Shared KMP logic (e.g. ViewModels, OpenID config). Depends on
:kmmOpenId.:simple:sharedUI — Shared Compose UI; can depend on :kappAuthCMP and
:simple:simpleKMPPorject.:simple:androidKMMSimple — Android app (native Compose).:simple:androidSimple — Android app variant.iOS apps (e.g. SwiftUI or Compose host) can depend on the same shared modules; see the library READMEs for platform setup.
Add the core library (and optionally the CMP helper) in your shared module:
kotlin {
sourceSets {
commonMain.dependencies {
api("io.github.the-best-is-best:kapp-auth:7.0.0")
// api("io.github.the-best-is-best:kapp-auth-cmp:7.0.0") // only for Compose Multiplatform
}
}
}Initialize at app startup (before any auth calls):
AuthOpenId().init("your_storage_key", "your_keychain_group")
AuthOpenId().doInit(key: "your_storage_key", group: "your_keychain_group")
Use the API for login, logout, refresh, and getLastAuth() — see *
kmmOpenId/README.md* for the full API and platform-specific flows, and *
kappAuthCMP/README.md* for Compose usage.
Apache-2.0. See LICENSE if present.
Repository: the-best-is-best/kotlin-openid
Kotlin Multiplatform authentication for OAuth 2.0 and OpenID Connect. This repo provides a shared API over the Android AppAuth and iOS AppAuth SDKs so you can use one codebase on both platforms.
| Module | Maven artifact | Description |
|---|---|---|
| kmmOpenId | io.github.the-best-is-best:kapp-auth:7.0.0 |
Core KMP auth library. No UI — use from shared logic (ViewModels, etc.) and wire to native or Compose UI. |
| kappAuthCMP | io.github.the-best-is-best:kapp-auth-cmp:7.0.0 |
Optional Compose Multiplatform helpers (RememberAuthOpenId, RememberLogoutOpenId) for shared UI. Depends on kmmOpenId. |
commonMain.:simple:simpleKMPPorject — Shared KMP logic (e.g. ViewModels, OpenID config). Depends on
:kmmOpenId.:simple:sharedUI — Shared Compose UI; can depend on :kappAuthCMP and
:simple:simpleKMPPorject.:simple:androidKMMSimple — Android app (native Compose).:simple:androidSimple — Android app variant.iOS apps (e.g. SwiftUI or Compose host) can depend on the same shared modules; see the library READMEs for platform setup.
Add the core library (and optionally the CMP helper) in your shared module:
kotlin {
sourceSets {
commonMain.dependencies {
api("io.github.the-best-is-best:kapp-auth:7.0.0")
// api("io.github.the-best-is-best:kapp-auth-cmp:7.0.0") // only for Compose Multiplatform
}
}
}Initialize at app startup (before any auth calls):
AuthOpenId().init("your_storage_key", "your_keychain_group")
AuthOpenId().doInit(key: "your_storage_key", group: "your_keychain_group")
Use the API for login, logout, refresh, and getLastAuth() — see *
kmmOpenId/README.md* for the full API and platform-specific flows, and *
kappAuthCMP/README.md* for Compose usage.
Apache-2.0. See LICENSE if present.
Repository: the-best-is-best/kotlin-openid