• Start

Methods

authenticate

The authenticate() method for the SurrealDB Swift SDK authenticates the connection with a JWT token.

Authenticates the current connection with a previously issued JWT access token.

Method Syntax
try await client.authenticate(token)

Arguments

Description

token

The JWT access token to authenticate the connection with.

try await client.authenticate(tokens.access)

You can also resume a session by supplying a token through a SessionContext when constructing the client.

Was this page helpful?