AuthenticationProvider

Interface for the authentication provider to be implemented by the application. This has the methods to handle the authentication process. This is used by AuthenticationProviderImpl

Functions

Link copied to clipboard
abstract suspend fun authenticate(context: Context, detailedAuthenticator: Authenticator?, authParams: LinkedHashMap<String, String>)

Authenticate the user with the selected authenticator.

Link copied to clipboard
abstract suspend fun authenticateWithEmailOtp(context: Context, authenticatorId: String, otpCode: String)

Authenticate the user with the Email OTP authenticator, only if the Email OTP not added as a first factor authenticator. If the Email OTP is added as a first factor authenticator, use the authenticate method to authenticate the user.

Link copied to clipboard
abstract suspend fun authenticateWithGithub(context: Context, authenticatorId: String)

Authenticate the user with the Github authenticator (Redirect).

Link copied to clipboard
@RequiresApi(value = 34)
abstract suspend fun authenticateWithGoogleNative(context: Context, authenticatorId: String)

Authenticate the user with the Google authenticator.

Link copied to clipboard
abstract suspend fun authenticateWithGoogleNativeLegacy(context: Context, authenticatorId: String, googleAuthenticateResultLauncher: ActivityResultLauncher<Intent>)

Authenticate the user with the Google authenticator using the legacy one tap method.

Link copied to clipboard
abstract suspend fun authenticateWithMicrosoft(context: Context, authenticatorId: String)

Authenticate the user with the Microsoft authenticator (Redirect).

Link copied to clipboard
abstract suspend fun authenticateWithOpenIdConnect(context: Context, authenticatorId: String)

Authenticate the user with the OpenID Connect authenticator.

Link copied to clipboard
@RequiresApi(value = 34)
abstract suspend fun authenticateWithPasskey(context: Context, authenticatorId: String, allowCredentials: List<String>? = emptyList(), timeout: Long? = null, userVerification: String? = null)

Authenticate the user with the Passkey authenticator.

Link copied to clipboard
abstract suspend fun authenticateWithSMSOtp(context: Context, authenticatorId: String, otpCode: String)

Authenticate the user with the SMS OTP authenticator, only if the SMS OTP not added as a first factor authenticator. If the SMS OTP is added as a first factor authenticator, use the authenticate method to authenticate the user.

Link copied to clipboard
abstract suspend fun authenticateWithTotp(context: Context, authenticatorId: String, token: String)

Authenticate the user with the TOTP token, only if the TOTP not added as a first factor authenticator. If the TOTP is added as a first factor authenticator, use the authenticate method to authenticate the user.

Link copied to clipboard
abstract suspend fun authenticateWithUsernameAndPassword(context: Context, authenticatorId: String, username: String, password: String)

Authenticate the user with the username and password.

Link copied to clipboard

Get authentication state flow

Link copied to clipboard
abstract suspend fun getBasicUserInfo(context: Context): LinkedHashMap<String, Any>?

Get the basic user information of the authenticated.

abstract suspend fun handleGoogleNativeLegacyAuthenticateResult(context: Context, resultCode: Int, data: Intent)

Handle the Google authentication result.

Link copied to clipboard
abstract suspend fun initializeAuthentication(context: Context)

Initialize the authentication process. This method will initialize the authentication process and emit the state of the authentication process.

Link copied to clipboard
abstract suspend fun isLoggedIn(context: Context): Boolean

Check whether the user is logged in or not.

Link copied to clipboard
abstract suspend fun isLoggedInStateFlow(context: Context)

Handle the authentication flow initially to check whether the user is authenticated or not.

Link copied to clipboard
abstract suspend fun logout(context: Context)

Logout the user from the application.

Link copied to clipboard
abstract suspend fun selectAuthenticator(authenticator: Authenticator): Authenticator?

Select the authenticator to authenticate the user. This method will select the authenticator to authenticate the user and get the details of the selected authenticator.