Member

interface Member

The Member interface provides methods for retrieving and updating the current authenticated member.

Types

Link copied to clipboard
data class UpdateParams(val name: String? = null, val untrustedMetadata: Map<String, Any>? = null, val mfaEnrolled: Boolean? = null, val mfaPhoneNumber: String? = null, val defaultMfaMethod: MfaMethod? = null)

Data class used for wrapping parameters used with Member updates

Properties

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

Exposes a flow of member data

Functions

Link copied to clipboard

Deletes a MemberAuthenticationFactor from the currently authenticated member

Link copied to clipboard
abstract suspend fun get(): MemberResponse
abstract fun get(callback: (MemberResponse) -> Unit)

Wraps Stytch’s organization/members/me endpoint.

Link copied to clipboard
abstract fun getSync(): MemberData?

Get member from memory without network call

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

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

Link copied to clipboard
abstract suspend fun update(params: Member.UpdateParams): UpdateMemberResponse
abstract fun update(params: Member.UpdateParams, callback: (UpdateMemberResponse) -> Unit)

Updates the currently authenticated member