Auth

class Auth

Handles authentication and token management.

Properties

Link copied to clipboard

The MyAnimeList Client ID.

Link copied to clipboard

The MyAnimeList Client Secret, if applicable.

Link copied to clipboard

The token manager used to store and retrieve authentication tokens.

Functions

Link copied to clipboard
suspend fun authenticate(authorizationCode: String, codeVerifier: String, redirectUri: String? = null): Session

Authenticates the user using an authorization code.

Link copied to clipboard
fun logout()

Logs out the user by clearing the stored tokens.

Link copied to clipboard
suspend fun refreshTokens(refreshToken: String? = tokenManager.refreshToken()): Session

Refreshes the authentication tokens.