Giter VIP home page Giter VIP logo

frontend-driver-interface's Introduction

Frontend Driver Interface

View the latest FDI spec on swaggerhub.

This is the API spec that is exposed by the SuperTokens backend SDKs which integrate with your backend APIs. An example SDK is our NodeJS SDK.

It is meant to be consumed only by frontend clients like a website client or a mobile app client.

frontend-driver-interface's People

Contributors

bhumilsarvaiya avatar jscyo avatar nkshah2 avatar porcellus avatar rishabhpoddar avatar sattvikc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

kant01ne

frontend-driver-interface's Issues

Changes between v1.5.0 and v1.6.0

The FDI spec: https://github.com/supertokens/frontend-driver-interface/blob/master/v1.6.0.md

  • New API: {apiBasePath}/signinup
  • New API: {apiBasePath}/signout
  • New API: {apiBasePath}/authorisationurl

Email verification related changes

  • Moved {apiBasePath}/user/email/verify/token to its own recipe (email verification)
  • Moved {apiBasePath}/user/email/verify to its own recipe (email verification)
  • Moved {apiBasePath}/user/email/verify to its own recipe (email verification)

  • auth-react
  • supertokens-website
  • auth0-spa-js
  • react-native
  • ios
  • android
  • nodejs
  • javalin
  • flask
  • fastapi
  • golang
  • laravel

Changes between 1.11 and 1.12

Changes

  • Adding passwordless recipe APIs
    • /signinup/code
    • /signinup/code/consume
    • /signup/email/exists
    • /signup/phoneNumber/exists

SDKs:

  • NodeJS
  • Golang
  • Python
  • website
  • auth-react
  • react-native

Changes between v1.4.0 and v1.5.0

The FDI spec: https://github.com/supertokens/frontend-driver-interface/blob/master/v1.5.0.md

  • New API: {apiBasePath}/user/email/verify/token POST

  • New API: {apiBasePath}/user/email/verify POST

  • New API: {apiBasePath}/user/email/verify GET

  • auth-react

  • auth0-spa-js

  • react-native

  • ios

  • android

  • nodejs

  • javalin

  • flask

  • fastapi

  • golang

  • laravel


Discussion points:

  • What should the output of {apiBasePath}/user/email/verify/token be if the email is already verified? Should it just be OK?
  • Are the API paths OK?

Add fdi-version header to requests

Frontend SDKs must

  • API requests have a fdi-version header for versioning purposes. The format is a X.Y,X1.Y1... for example 1.2,3.4,1.1. In the driver, we must take care to remove spaces and then get the latest common version between the two SDKs (like we do for CDI)

Drivers must:

  • Extracting the latest, common (between frontend and backend SDK) FDI version from the request and passing that to the module. If no FDI is present, then assume the latest FDI supported by the backend SDK. If FDI is present, but none matching, then throw an appropriate error.
  • This also needs to be exposed in Access-Control-Allow-Headers
  • If it is missing, we assume the latest version supported by the driver.

  • supertokens-website
  • supertokens-auth-react
  • ios
  • android
  • react native
  • nodejs
  • javalin
  • flask
  • fastapi
  • golang
  • laravel

Changes between v1.2.0 and v1.3.0

The FDI spec: https://github.com/supertokens/frontend-driver-interface/blob/master/v1.3.0.md

  • All API requests must have an optional rid header. This also needs to be exposed in Access-Control-Allow-Headers
  • Removal of supertokens-sdk-name and supertokens-sdk-version
  • Refresh API URL change
  • New API: {apiBasePath}/signin
  • New API: {apiBasePath}/signup
  • New API: {apiBasePath}/user/password/reset/token
  • New API: {apiBasePath}/user/password/reset

  • website
  • auth-react
  • auth0-spa-js
  • react-native
  • ios
  • android
  • nodejs
  • javalin
  • flask
  • fastapi
  • golang
  • laravel

Changes between 1.9 and 1.10

  • Adds authCodeResponse to thirdparty and thirdpartyemailpassword's signinup POST API to support auth code exchange via PKCE method.
  • Adds an optional clientId in signinup API to thirdparty and thirdpartyemailpassword
  • Adds apple sign in callback API

SDKs:

  • NodeJS
  • Golang
  • Python
  • website
  • auth-react
  • react-native

Manual Testing:

  • All backend SDKs with auth-react tests without SKIP_OAUTH=true
  • All backend SDKs with react native demo app

Other TODOs:

  • Move FDI into master and on swagger hub

Changes between v1.7.1 and 1.8.0

  • All requests that go through session interception will have a custom header rid to prevent CSRF attacks (see this). The backend would then need to check for the existence of this header in case CSRF is enabled

  • auth-react
  • supertokens-website
  • auth0-spa-js
  • react-native
  • ios
  • android
  • nodejs
  • javalin
  • flask
  • fastapi
  • golang
  • laravel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.