Skip to content
NEW BENCHMARKS

SurrealDB 3.x by the numbers

View

1/3

Integrate Auth0 as an Authentication provider

Tutorial

Jan 14, 20241 min read

Gerard Guillemas Martos

Gerard Guillemas Martos

Show all posts

Integrate Auth0 as an Authentication provider

Our newsletter

Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks

This guide will cover using as the authentication provider for single-page web applications using SurrealDB as the only backend. In this guide you will learn the following:

  • How to configure Auth0 to issue tokens that can be used with SurrealDB.
  • How to configure SurrealDB to accept tokens issued by Auth0.
  • How to define user-level authorisation using SurrealDB scopes.
  • How to authenticate users with Auth0 in a single-page application.
  • How to retrieve and update information from SurrealDB using the authenticated user.

This guide will cover the most general case, in which SurrealDB is the only backend for your application. You can still follow this guide even if you have additional backends, but in that case you may have other options available to request and validate tokens issued by Auth0. Likewise, even if your application is not strictly a Single-Page Application (SPA), you may still follow and benefit from this guide.

!

Our newsletter

Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks

SurrealDB

The context layer for AI agents.

Documents, graphs, vectors, time-series, and memory.
One transaction, one query, one deployment.

Explore with AI

Independently verified

SOC 2 Type 2

GDPR

Cyber Essentials Plus

ISO 27001

Trust Centre

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom