Skip to main content

Frontend Driver Interface

Overview

The FDI, Frontend Driver Interface, is the API exposed by the SuperTokens Backend SDKs. It is meant to be consumed only by your frontend applications.

In most cases, you don't need to directly interact with the API, since the existing frontend SDKS are built on top of it. If you are using something that does not have SDK support, then you can make use of the FDI resources.

URL Structure

All the endpoints are prefixed with {apiBasePath}. This is the property with the same name that you set during backend SDK initialization.

Tenant specific actions include a {tenantId} parameter. If not set, the default tenant will be used.

Given the following endpoint: /{apiBasePath}/{tenantId}/signinup, and the apiBasePath set to auth during initialization:

  • You can call it without the actual parameter, using /auth/signinup in your action.
  • You can set the values to target a specific tenant: /auth/myTenant/signinup.

Versioning

At the moment, the documentation pages only show the latest version of the API. If you want to check an older release, please access the Swagger page

To know which version you should see:

  1. Go to the GitHub page of the backend or frontend SDK you are using
  2. Switch to the branch that matches the version of the SDK
  3. Open the file called frontendDriverInterfaceSupported.json
  4. In there, you see an array of X.Y values, pick the latest one, and see the API spec for that.

Authentication

Since this API allows users to sign up or login, most of the endpoints do not require any type of credentials. However, in some situations you have to authenticate your requests. In those cases, you need to choose between using cookies or headers. The method that you have to use depends on the token transfer method used in your application.