• Start

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)

Argument

Description

token

The JWT to authenticate with.

session

An optional session id.

client.authenticate("eyJhbGciOi...")

Was this page helpful?