SuperTokens

SuperTokens

  • Docs
  • Discord
  • Blog

โ€บQuick setup

SIDEBAR_REPLACE_DOC_Introduction

  • Introduction

Quick setup

  • Video tutorial & Architecture
  • Frontend
  • Backend
  • Core

    • Core Overview
    • Self Hosted setup with Docker
    • Self Hosted setup without Docker
    • Managed Service

    Database Setup

    • MySQL
    • PostgreSQL

Common customizations

  • Sign Out
  • Sign Up Form

    • About
    • Adding Extra Fields
    • Adding / Modifying field validators
    • Embed in a page
    • Handling signup success
    • Terms of service & Privacy policy links

    Sign In Form

    • About
    • Adding / Modifying field validators
    • Password managers
    • Embed in a page
    • Show Sign In by default

    Reset Password

    • About
    • Reset password email
    • Embed in a page

    Email Verification

    • About
    • Customising the email sent
    • Embed in a page

    Sessions

    • About
    • Cookie Consent
    • Creating a new session
    • Session Verification in API
    • Change session timeout
    • Checking if a session exists on the frontend
    • Get user information on the frontend
    • Using with FaunaDB

    Styling

    • Changing Colours
    • Changing Style via CSS
    • Themes

    Changing base path

    • Website Base Path
    • API Base Path

    Multi Tenancy

    • About
    • One login, many sub domains
    • One login per sub domain
  • User Pagination

Advanced users

    Advanced session management

    • Share sessions across sub domains
    • Anti CSRF
    • JWT Signing key rotation
    • Access token blacklisting
    • Customizing Error Handling

    Supertokens Core config

    • Adding API Keys
    • Tuning Performance
    • Logging
    • Rename database tables

    Make your own frontend

    • Sign-up / Sign-in custom theme
    • Reset password custom theme

    Make your own backend

    • Sign up custom API
    • Sign in custom API
    • Reset password custom APIs

NextJS

  • SuperTokens with NextJS
  • Deploy with Vercel
  • Deploy with Netlify

SIDEBAR_REPLACE_DOC_SDKs

  • SDKs

SIDEBAR_REPLACE_DOC_Compatibility Table

  • Compatibility Table

Migration

  • Migrating from an older version of SuperTokens
  • Migrating to SuperTokens
  • Migrating away from SuperTokens
  • From managed service to self hosted

Video tutorial & Architecture

Quick implementation video ๐Ÿ“บ

  • 00:00 Project Setup
  • 00:35 Frontend SDK Setup
  • 02:37 Backend SDK Setup
  • 04:21 Checking if a session exists on the frontend
  • 06:00 Fetching session userId on the frontend
  • 06:47 Setting up session verification
  • 08:45 Implementing sign out & testing
  • 10:00 Running the SuperTokens core for your app
  • 11:12 Connecting the core to a MySQL database & testing it

Application Architecture ๐Ÿฐ

  • Frontend SDK: Responsible for rendering the login UI widgets and managing session tokens automatically.
  • Backend SDK: Provides APIs for sign-up, sign-in, signout, session refreshing etc... You can also disable these default APIs and build your own using the provided functions from this SDK.
  • SuperTokens Core: This is an HTTP service that contains the core logic for auth and sessions. It's also responsible for interfacing with the database. We have one instance of the Core running on https://try.supertokens.io which is used in the Demo app.

Why we chose Java for the SuperTokens core

  • โœ… Whilst running Java can seem difficult, we provide the JDK along with the binary / docker image when distributing it. This makes running SuperTokens just like running any other http microservice.
  • โœ… Java has a very mature ecosystem. This implies that third party libraries have been battled tested.
  • โœ… Java's strong type system ensures fewer bugs and easier maintainability. This is especially important when many people are expected to work on the same project.
  • โœ… Our team is most comfortable with Java and hiring for great Java developers is relatively easy as well.
โ† IntroductionFrontend โ†’