Skip to content

AuthResult

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.auth/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.

AuthResult [jvm]
constructor(user: User? = null, session: AuthSession? = null, is2faRequired: Boolean = false, userId2fa: String? = null)
Name Summary
is2faRequired [jvm]
val is2faRequired: Boolean
session [jvm]
val session: AuthSession?
user [jvm]
val user: User?
userId2fa [jvm]
val userId2fa: String?