Skip to content

Latest commit

 

History

History
50 lines (44 loc) · 950 Bytes

README.md

File metadata and controls

50 lines (44 loc) · 950 Bytes

TeslaAndroidAuth

Lightweight Android library for Tesla SSO Authentication based on Tesla JSON API (Unofficial)

Setup

repositories {
    mavenCentral()
}

dependencies {
    implementation("energy.octopus:tesla-android-auth:$teslaAndroidVersion")
}

Usage

Supports only Compose for now

Tesla

TeslAuth(
        onError = {
            // Handle error
        },
        onSuccess = {
            // Handle success
        },
        loadingIndicator = {
            // Your custom loading indicator composable
        }
    )

Ohme

OhmeAuth(
        clientId = yourOhmeClientId,
        redirectUri = yourOhmeRedirectUri,
        state = ohmeState,
        onError = {
            // Handle error
        },
        onSuccess = {
            // Handle success
        },
        loadingIndicator = {
            // Your custom loading indicator composable
        }
    )