Stytch - User infrastructure + passwordless authentication
import {
AuthFlowType, StytchB2B,
oauth, emailMagicLinks, sso, passwords,
} from '@stytch/nextjs/b2b';
const LoginOrSignup = () => {
const config = {
authFlowType: AuthFlowType.Discovery,
products: [oauth, emailMagicLinks, sso],
// Adding auth features is as simple as
// products: [oauth, emailMagicLinks, sso, passwords],
emailMagicLinksOptions: {
loginRedirectURL: 'https://stytch.com/authenticate',
signupRedirectURL: 'https://stytch.com/authenticate',
},
ssoOptions: {
loginRedirectURL: 'https://stytch.com/authenticate',
signupRedirectURL: 'https://stytch.com/authenticate',
},
oauthOptions: {
providers: [
{
type: 'google',
one_tap: true,
position: 'floating',
},
{
type: 'github',
},
],
},
};
return <StytchB2B config={config} />;
};