Socket
Socket
Sign inDemoInstall

stytch

Package Overview
Dependencies
Maintainers
8
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stytch

A wrapper for the Stytch API


Version published
Weekly downloads
28K
decreased by-2.44%
Maintainers
8
Weekly downloads
 
Created
Source

stytch-node

The Stytch Node library provides support for the Stytch API for server-side Javscript applications. You can find out more about the Stytch API at stytch.com/docs.

If you're looking for frontend support for our Javascript SDK, check out stytch-js.

Quickstart

Install stytch

npm install stytch

Run login_or_create to send a magic link by email:

import * as stytch from "stytch";
// Or as a CommonJS module:
// const stytch = require("stytch");

const client = new stytch.Client({
  project_id: "PROJECT_ID",
  secret: "SECRET",
  env: stytch.envs.test,
});

client.magicLinks.email
  .loginOrCreate({
    email: "sandbox@stytch.com",
    login_magic_link_url: "http://localhost:8000/login",
    signup_magic_link_url: "http://localhost:8000/signup",
  })
  .then((res) => console.log(res))
  .catch((err) => console.error(err));

client.magicLinks
  .authenticate("TOKEN FROM EMAIL")
  .then((res) => console.log(res))
  .catch((err) => console.error(err));

Documentation

You can find all the documentation at https://stytch.com/docs, including an API reference with example usage for every endpoint. We also maintain a set of example apps to start development from.

FAQs

Package last updated on 09 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc