Giter VIP home page Giter VIP logo

stytchjs-react-magic-links's Introduction

Stytch React Example App

This example app uses the Stytch React component to send magic links and a server to authenticate magic links. This repo contains several implementations of the same server written in Node and Python.

In order to use this app, you'll need to build the frontend and start the backend server.

Configure your Stytch credentials

  1. Copy the .env_template to your own .env file (cp .env_template .env)
  2. Fill in the placeholder values for STYTCH_PROJECT_ID, STYTCH_SECRET, and REACT_APP_STYTCH_PUBLIC_TOKEN in your .env file. Get your Stytch API credentials from the API keys in your Stytch dashboard.
  3. Add http://localhost:3000/authenticate as a valid sign-up and login URL on your Stytch dashboard.

Quick start

Build the client and run a Node server by running ./quickstart.sh. Run ./quickstart.sh --help to see all the server options.

Visit http://localhost:3000 to see the example app.

Build the client

To build the client by itself, follow these instructions:

  1. Make sure you have node installed: brew install node
  2. Install dependencies: npm install
  3. Build the frontend files from the client directory. Note: You'll need to rebuild your files to reflect any changes you want to make.
    $ cd client
    $ npm run build
    
  4. This example app serves the frontend when you run a backend server. Click on the links under Supported server languages to go to the readme for your preferred language.

Supported server languages

To run the server by itself, navigate to the setup instructions for the backend you want to use:

stytchjs-react-magic-links's People

Contributors

nathan-stytch avatar snyk-bot avatar jeremy-stytch avatar mary-stytch avatar danny-stytch avatar julianna-stytch avatar max-stytch avatar susie-stytch avatar alex-stytch avatar chris-stytch avatar howard-stytch avatar lucy-stytch 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.