import { AuthFlowType, B2BProducts, StytchB2B } from "@stytch/react/b2b";
const discoveryConfig = {
authFlowType: AuthFlowType.Discovery,
products: [B2BProducts.emailMagicLinks, B2BProducts.oauth],
emailMagicLinksOptions: {
discoveryRedirectURL: 'https://example.com/authenticate',
},
oauthOptions: {
discoveryRedirectURL: 'https://example.com/authenticate',
providers: [
{ type: 'google', one_tap: true, cancel_on_tap_outside: false },
{ type: 'microsoft' },
],
},
sessionOptions: {
sessionDurationMinutes: 60,
},
};
// Render the StytchB2B component
<StytchB2B config={discoveryConfig} />