- Check Valid Session: Manage blockchain accounts to sign up or sign in users.
- Control Session Validation: Authentication sessions to return important details to be consumed by your application to enhance the experience of games and applications.
- Close Session: Manage the listing and dropping of sessions handled by the WaaS stack.
Validation status
To check the validation status of the current session, use theisSessionValid
method. This returns true
for email login and trusted social logins and false
for custom logins until email validation is complete.
Trigger session validation
Manually trigger a session validation with thevalidateSession
method. This will send a code to the user’s email. If validated within 10 minutes, the method returns true
; otherwise, it returns false
.
finishValidateSession
method that takes the code as an argument. If the code is valid, the method returns true
; otherwise, it returns false
.
Control Session Validation
TheonValidationRequired
callback is used to determine the need for session validation during actions like sending transactions or signing messages. If the callback returns true
, it triggers session validation. If it returns false
, the related action is cancelled. This mechanism ensures that only validated sessions can proceed with sensitive operations.
Listen for session validations
Events like transaction sends may silently prompt session validation. Use theonValidationRequired
hook to catch such instances.
Manage Automatic session validation
Automatic session validation occurs during actions that require validation. Manage this process using the onValidationRequired hook.true
or false
from the onValidationRequired
hook, you either continue or cancel the action, respectively.
Close Session
A session can be closed using theid
of the session. Any session can be closed from any device with an active session.