Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@stytch/stytch-react
Advanced tools
This repository is no longer used for active development. Please make future PRs in the new js-sdk-turbo repository. We will continue to fix bugs and security vulnerabilities in this repository until this version of the SDK is sunsetted.
Stytch's React Library
With npm
npm install @stytch/stytch-react --save
For full documentation please refer to Stytch's javascript SDK documentation on https://stytch.com/docs/sdks.
import { Stytch } from "@stytch/stytch-react";
const App = () => {
const stytchProps = {
loginOrSignupView: {
products: ["emailMagicLinks"],
emailMagicLinksOptions: {
loginRedirectURL: "https://example.com/authenticate",
loginExpirationMinutes: 30,
signupRedirectURL: "https://example.com/authenticate",
signupExpirationMinutes: 30,
createUserAsPending: true,
},
},
style: {
fontFamily: '"Helvetica New", Helvetica, sans-serif',
width: "321px",
primaryColor: "#0577CA",
},
publicToken: "public-token-111-111-1234",
callbacks: {
onEvent: (message) => console.log(message),
onSuccess: (message) => console.log(message),
onError: (message) => console.log(message),
},
};
return (
<div id="login">
<Stytch
publicToken={stytchProps.publicToken}
loginOrSignupView={stytchProps.loginOrSignupView}
style={stytchProps.style}
callbacks={stytchProps.callbacks}
/>
</div>
);
};
There are built in typescript definitions in the npm package.
[3.0.1] - 2020-8-25
@stytch/stytch-js
has been bumped to include new OAuth typesSDKProductTypes
and OAuthProvidersTypes
are now re-exported for convenience[3.0.0] - 2020-8-1
FAQs
Stytch's official React Library
We found that @stytch/stytch-react demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 19 open source maintainers collaborating on the project.
Did you know?
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.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.