Chord OMS
...
Authentication
Stytch

Stytch Account Setup

10min
step 1 create your account you, as the customer, are completely in control of your stytch account by working with chord, we can offer you a service credit of $1,000 to see if you are elgible, fill out this form if you have any questions please reach out brandon huang otherwise, visit stytch and follow the steps to create an account step 2 configure the stytch project 1\ add redirect urls you will need to add a redirect url for each callback location you plan to use this is the url that stytch will navigate to when the user clicks the link from their email we recommend using www your site com/authenticate http //www your site com/authenticate you will need to add a redirect url for each action you would like to use (login, sign up, invite, and reset password) for example, if you want to allow users to login or sign up for an account on http //localhost 3000, you need to add http //localhost 3000/authenticate to the login and the sign up sections one thing to note is that stytch segregates it's test and production level accounts for security purposes, you should have your non production domains in the test environment and your production domains in the live environment 2\ sdk configuration first, click the "enable sdk" button and select "enable" on the confirmation dialogue second, expand the "domains" section and add the base domains that you added to the redirect urls (in our example, http //localhost 3000) third, expand the "email magic links" section and toggle on enable the loginorcreate flow, enable the send flow, and enable pkce finally, if you would like enable oauth login methods for the sdk, you can do that now it should be noted that you will need to do these steps for both the test and live environments! 3\ configure session length stytch has a configurable max session length it defaults to 60 minutes, which we at chord feel is way too short, given the limited scope that authentication confers for chord's customer endpoints the maximum that stytch allows is 90 days and can be configured per environment, which allows for more rapid logouts as a part of development without impacting your customers please note that this is the maximum session duration and that you must also set this limit when initializing chord stytch 4\ (optional) configure oauth if you would like to provide your customers with the ability to login with services like google, facebook, amazon and many more, stytch offers a beavy of oauth login options that can be easily integrated into your login form to set it up, follow the instructions that stytch provides you as a part of their oauth provider onboarding flows step 3 configure chord oms to use stytch in order for your customers to use stytch authentication, you must provide stytch's keys as environment variables these variables can be added at any time, as a seperate environment variable controls with authentication method is used to set environment variables in the oms, login to the oms and navigate to settings > stores and the environment variables are at the bottom of the page the environment variables you must set are auth provider set to stytch when you are ready to go live with stytch stytch env must be either test or live stytch project id the project id for the environment, which can be found here stytch secret the secret key for the environment, which can be found here step 4 integrate stytch into your chord storefront we have serveral guides on how to integrate/migrate stytch into your storefront next js ↔️ stytch migration guide docid\ iku qprh57qgybehrlkfs gatsby ↔️ stytch migration guide docid\ phg0anblwvgitsjinrwzg