Android SDK for ThunderID. Provides authentication and user management for native Android applications.
Make sure your project's settings.gradle.kts includes JitPack:
dependencyResolutionManagement {
repositories {
maven("https://jitpack.io")
}
}dependencies {
implementation("com.github.thunder-id:android-sdks:<latest-release-tag>")
}For Jetpack Compose UI components, also add:
dependencies {
implementation("com.github.thunder-id.android-sdks:compose:<latest-release-tag>")
}Note
Replace <latest-release-tag> with the latest release tag of the android-sdks repository.
Set endpoints.backend to hand sign-in to a backend your application owns (the Backend for Frontend
pattern of RFC 10017). The backend runs the OAuth flow and keeps the tokens; the app holds only an opaque
session handle.
In backend mode, baseUrl is the backend. Each backend endpoint is a path resolved against it, or an
absolute HTTPS URL used as is, and any endpoint left unset defaults to a path under /api/auth. Requests
to your API go through the backend's proxy: set endpoints.backend.apiBaseUrl to the API's base URL,
which defaults to baseUrl. Every URL must use HTTPS.
ThunderIDConfig(
baseUrl = "https://app.example.com", // the backend
endpoints =
ThunderIDEndpoints(
backend =
ThunderIDBackendEndpoints(
apiBaseUrl = "https://api.example.com", // proxied through the backend
session = "/auth/session", // resolved against baseUrl
signIn = "https://login.example.com/signin", // absolute, used as is
),
),
)The playground directory contains a Jetpack Compose app that builds this SDK from source and exercises
every capability: capability checks, a component explorer, and a session inspector. See the
playground README to run it against a local ThunderID server.
Please refer to the Contributing Guide for the different ways to contribute to this project and the relevant guidelines.
For code contributions, refer to the Contributing Code section for details on the prerequisites and instructions for running ThunderID in development mode.
This project is licensed under the Apache License 2.0
