• Start

Languages

/

Mojo

/

Methods

authenticate

The authenticate() method for the SurrealDB Mojo SDK authenticates the current connection with a token.

Authenticates the current connection with a token, and stores it on the client for subsequent requests.

Method Syntax

client.authenticate(token, session)
ArgumentDescription
tokenThe JWT to authenticate with.
sessionAn optional session id.
client.authenticate("eyJhbGciOi...")

Was this page helpful?