import React from 'react';
import { StytchB2B } from '@stytch/nextjs/b2b';
import { AuthFlowType } from '@stytch/vanilla-js';
const LoginOrSignup = () => {
const config = {
authFlowType: AuthFlowType.Discovery,
products: ['emailMagicLinks', 'oauth'],
// Adding auth features is as simple as
// products: ['emailMagicLinks', 'oauth', 'passwords'],
emailMagicLinksOptions: {
loginRedirectURL: 'https://stytch.com/authenticate',
loginExpirationMinutes: 30,
signupRedirectURL: 'https://stytch.com/authenticate',
signupExpirationMinutes: 30,
},
oauthOptions: {
providers: [
{
type: 'google',
one_tap: true,
position: 'floating',
},
],
},
};
return <StytchB2B config={config} />;
};