GithubHelp home page GithubHelp logo

tkottke90 / supertokens-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 239 KB

Demo Application Using SuperTokens and Various Auth Flows

Shell 0.55% Dockerfile 1.62% TypeScript 81.66% HTML 1.73% SCSS 14.45%

supertokens-demo's Introduction

Demo: SuperTokens

I learned recently about SuperTokens as an alternative to Firebase Auth, Auth0, and Keycloak. The market themselves as a developer friendly solution to authentication as a service.

For this project I followed their Email/Password and Social Tutorial (using my own UI) to learn about how to implement this in an existing project.

Overall it seems to live up to it's selling points and was fairly straight forward to implement. I think I will be using it in the future as an alternative to Keycloak which I have found to be a struggle to implement.

Project Setup

To use this project you will need to have the following setup:

  • NodeJS (v16 or newer)
  • NPM
  • Docker & Docker Compose

To setup this project you will first need to clone the repo:

git clone [email protected]:tkottke90/supertokens-demo.git

After you have done that, we need to setup the "SuperTokens Core" which is a docker container that handles all of the logic around authentication flows. The backend is loaded with configurations to interact with this docker container using the SuperTokens SDK. You can use the provided setup.sh script to get going:

./setup.sh

The script will also take care of running npm install on both the frontend and backend directories to get them up and ready to go.

Finally open a terminal for each environment and run npm run start to spin up the backend and frontend. The backend uses Nodemon and TS-Node and the frontend is Preact and Vite.

# Terminal 1
cd frontend
npm run start
# Terminal 2
cd backend
npm run start

Vite will provide you with a link in your terminal to open the page in your web browser and you should be off to the races!

supertokens-demo's People

Contributors

tkottke90 avatar

Watchers

 avatar

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.