Dev Authentication

open class DevAuthentication

Base class for authentication service

Author

Jimly A.

Since

15-Nov-21

Constructors

Link copied to clipboard
fun DevAuthentication()

Functions

Link copied to clipboard
open fun authenticateWithGoogle(token: String)

method to authenticate from token

Link copied to clipboard
open fun getCurrentUser(): MobileServiceUser?

method to get currently logged in user

Link copied to clipboard
open fun getUserIdToken(action: (String) -> Unit)

method to get id token of currently logged in user

Link copied to clipboard
open fun logout()

method to logout currently logged in user

Link copied to clipboard
open fun registerContract(activity: AppCompatActivity)

method to register Activity Result Contract

Link copied to clipboard
open fun setAuthListener(listener: (Boolean) -> Unit)

method to listen for authentication changes

Link copied to clipboard
open fun signInWith(    type: Int,     ctx: Activity,     action: (Boolean, String) -> Unit)

method to sign in with global provider

Link copied to clipboard
open fun signInWithGoogle(action: (Boolean, String) -> Unit)

method to sign in with Google

Properties

Link copied to clipboard
open var authAction: (Boolean, String) -> Unit? = null

action when authentication happen

Sources

Link copied to clipboard