AuthResult
//fluxbase-kotlin/io.github.nimbleflux.fluxbase.auth/AuthResult
AuthResult
Section titled “AuthResult”[jvm]
data class AuthResult(val user: User? = null, val session: AuthSession? = null, val is2faRequired: Boolean = false, val userId2fa: String? = null)
The result of a sign-in or sign-up call.
On success with a session: session is non-null, user is set. On 2FA challenge: is2faRequired is true, userId2fa holds the user id, session is null. On error: the FluxbaseResponse.Error variant is returned.
Port of the TS AuthResponseData (types.ts:3923) which returns { user, session: AuthSession | null }, combined with the 2FA branch that returns SignInWith2FAResponse instead.
Constructors
Section titled “Constructors”| AuthResult | [jvm] constructor(user: User? = null, session: AuthSession? = null, is2faRequired: Boolean = false, userId2fa: String? = null) |
Properties
Section titled “Properties”| Name | Summary |
|---|---|
| is2faRequired | [jvm] val is2faRequired: Boolean |
| session | [jvm] val session: AuthSession? |
| user | [jvm] val user: User? |
| userId2fa | [jvm] val userId2fa: String? |