I was following the B2B NextJS example app from yalls Github, and I brought over some code for OAuth discovery start url building and I noticed a discrepancy between the generated URLs from the Github repo and my custom repo.
My Personal Project:
With my personal project, I was getting 404 route_not_defined errors from the generated link. The difference I found was that my personal project’s generated url wasn’t including the v1 in front of the b2b path.
I believe I tracked down the discrepancy from the Stytch clients being different:
My Custom Project
Where the stytchEnv for 7.5.1 is formatted like
export declare const test = "https://test.stytch.com/v1/"; export declare const live = "https://api.stytch.com/v1/";
and the stytchEnv for 8.4.2 is formatted like
export declare const test = "https://test.stytch.com/"; export declare const live = "https://api.stytch.com/";
I fixed this for my local project by simply prepending a v1 to my url generation step. But wanted to make sure this was expected or not.