jvmMain.io.github.jan.supabase.compose.auth.composable.GoogleAuth.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compose-auth-jvm Show documentation
Show all versions of compose-auth-jvm Show documentation
Extends gotrue-kt with composable
package io.github.jan.supabase.compose.auth.composable
import androidx.compose.runtime.Composable
import io.github.jan.supabase.compose.auth.ComposeAuth
import io.github.jan.supabase.compose.auth.defaultLoginBehavior
import io.github.jan.supabase.compose.auth.defaultSignOutBehavior
import io.github.jan.supabase.gotrue.SignOutScope
/**
* Composable function that implements Native Google Auth.
*
* On unsupported platforms it will use the [fallback]
*
* @param onResult Callback for the result of the login
* @param fallback Fallback function for unsupported platforms
* @return [NativeSignInState]
*/
@Composable
actual fun ComposeAuth.rememberSignInWithGoogle(onResult: (NativeSignInResult) -> Unit, fallback: suspend () -> Unit): NativeSignInState = defaultLoginBehavior(fallback)
/**
* Composable for signing out with Google
*/
@Composable
actual fun ComposeAuth.rememberSignOutWithGoogle(signOutScope: SignOutScope): NativeSignInState = defaultSignOutBehavior(signOutScope)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy