
Full-stack authentication stack: ready-to-run server plus shared SDK and client SDK with federated Google, passkey, OTP, email verification, KYC, reusable UI and credential manager.
Full-stack auth for Kotlin Multiplatform: Spring Auth Server + KMP SDK + Client SDK
// BASE64_ENCRYPTION_KEY generator
openssl rand -base64 32docker pull pitampoudel/komposeauth:latest
# Quick start
docker run -p 80:8080 \
-e MONGODB_URI="mongodb://your-mongo-host:27017/db-name" \
-e BASE64_ENCRYPTION_KEY="<paste-your-base64-key>" \
pitampoudel/komposeauth:latestShared module (optional and also included already on client module)
// Check the badge above for the latest version
implementation("io.github.pitampoudel:komposeauth-shared:x.x.x")Client module
// Check the badge above for the latest version
implementation("io.github.pitampoudel:komposeauth-client:x.x.x")HttpClient example (at each platform)
val httpClient = HttpClient {
installKomposeAuth(
authServerUrl = "https://your-auth-server",
resourceServerUrls = listOf(
"https://your-resource-server"
)
)
}Initialize SDK
initializeKomposeAuth(
httpClient = httpClient
)Utilities
Current user
val userState = rememberCurrentUser()Login with Credential Manager
val vm = koinViewModel<LoginViewModel>()
val state = vm.state.collectAsStateWithLifecycle().value
val credentialManager = rememberKmpCredentialManager()
LaunchedEffect(state.loginConfig) {
state.loginConfig?.let {
when (val result = credentialManager.getCredential(it)) {
is Result.Error -> vm.onEvent(LoginEvent.ShowInfoMsg(result.message))
is Result.Success<Credential> -> vm.onEvent(LoginEvent.Login(result.data))
}
}
}OTP
val vm = koinViewModel<OtpViewModel>()
registerSmsOtpRetriever { code ->
// vm.onEvent(OtpEvent.CodeChanged(code))
}Profiles and KYC
val profileVm = koinViewModel<ProfileViewModel>()
val kycVm = koinViewModel<KycViewModel>()./gradlew build before submitting a PRIf you discover a security vulnerability, please email the maintainers or open a private security advisory. Avoid filing public issues with sensitive details.
Apache License 2.0. See LICENSE for details.
Full-stack auth for Kotlin Multiplatform: Spring Auth Server + KMP SDK + Client SDK
// BASE64_ENCRYPTION_KEY generator
openssl rand -base64 32docker pull pitampoudel/komposeauth:latest
# Quick start
docker run -p 80:8080 \
-e MONGODB_URI="mongodb://your-mongo-host:27017/db-name" \
-e BASE64_ENCRYPTION_KEY="<paste-your-base64-key>" \
pitampoudel/komposeauth:latestShared module (optional and also included already on client module)
// Check the badge above for the latest version
implementation("io.github.pitampoudel:komposeauth-shared:x.x.x")Client module
// Check the badge above for the latest version
implementation("io.github.pitampoudel:komposeauth-client:x.x.x")HttpClient example (at each platform)
val httpClient = HttpClient {
installKomposeAuth(
authServerUrl = "https://your-auth-server",
resourceServerUrls = listOf(
"https://your-resource-server"
)
)
}Initialize SDK
initializeKomposeAuth(
httpClient = httpClient
)Utilities
Current user
val userState = rememberCurrentUser()Login with Credential Manager
val vm = koinViewModel<LoginViewModel>()
val state = vm.state.collectAsStateWithLifecycle().value
val credentialManager = rememberKmpCredentialManager()
LaunchedEffect(state.loginConfig) {
state.loginConfig?.let {
when (val result = credentialManager.getCredential(it)) {
is Result.Error -> vm.onEvent(LoginEvent.ShowInfoMsg(result.message))
is Result.Success<Credential> -> vm.onEvent(LoginEvent.Login(result.data))
}
}
}OTP
val vm = koinViewModel<OtpViewModel>()
registerSmsOtpRetriever { code ->
// vm.onEvent(OtpEvent.CodeChanged(code))
}Profiles and KYC
val profileVm = koinViewModel<ProfileViewModel>()
val kycVm = koinViewModel<KycViewModel>()./gradlew build before submitting a PRIf you discover a security vulnerability, please email the maintainers or open a private security advisory. Avoid filing public issues with sensitive details.
Apache License 2.0. See LICENSE for details.