Skip to content

About

Developer resources for building Android applications with ThunderID

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

ThunderID Android SDK

Android SDK for ThunderID. Provides authentication and user management for native Android applications.

Installation

Gradle

GitHub release

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.

Backend mode

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
                ),
        ),
)

Playground

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.

Contributing

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.

License

This project is licensed under the Apache License 2.0

About

Developer resources for building Android applications with ThunderID

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages