UserManagement

interface UserManagement

The UserManagement interface provides methods for retrieving an authenticated user and deleting authentication factors from an authenticated user.

Types

Link copied to clipboard
data class SearchParams(val email: String)

Data class used for wrapping parameters used for searching Users

Link copied to clipboard
data class UpdateParams @JvmOverloads constructor(val name: NameData? = null, val untrustedMetadata: Map<String, Any>? = null)

Data class used for wrapping parameters used with User updates

Properties

Link copied to clipboard
abstract val onChange: StateFlow<UserData?>

Exposes a flow of user data

Functions

Link copied to clipboard
abstract fun deleteFactor(factor: UserAuthenticationFactor, callback: (DeleteFactorResponse) -> Unit)

Deletes a UserAuthenticationFactor from the currently authenticated user

Link copied to clipboard

Deletes a UserAuthenticationFactor from the currently authenticated user

Link copied to clipboard
abstract fun getSyncUser(): UserData?

Get user from memory without making a network call

Link copied to clipboard
abstract suspend fun getUser(): UserResponse
abstract fun getUser(callback: (UserResponse) -> Unit)

Fetches a user from the current session

Link copied to clipboard

Fetches a user from the current session

Link copied to clipboard
abstract fun onChange(callback: (UserData?) -> Unit)

Assign a callback that will be called when the user data changes

Link copied to clipboard
abstract fun search(params: UserManagement.SearchParams, callback: (SearchUserResponse) -> Unit)

Searches for the specified user

Link copied to clipboard

Searches for the specified user

Link copied to clipboard
abstract fun update(params: UserManagement.UpdateParams, callback: (UpdateUserResponse) -> Unit)

Updates the currently authenticated user

Link copied to clipboard

Updates the currently authenticated user