In the abbreviated SvelteKit SSR instructions, `createBrowserClient` is
used in hybrid code that runs on both the server and client, with
changes in the configuration depending on where it's run. That's just
confusing, because the name implies it should not run on the server.
Change it to match the full SvelteKit SSR tutorial, which selectively
runs `createBrowserClient` or `createServerClient` depending on the
current environment.
Updated the redirect path if user is not found
Because the redirect path was `/` when I logged out and then went to something like `localhost:3000/` , this cause an infinite redirect loop and caused the app to break.
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* Update next.js setup docs email template
The email templates need to have the type parameter.
The wording here is a bit clumsy but it's hard to convey succinctly. A variable for the email type would be kinda cool.
I was getting 401 `AuthApiError: Email link is invalid or has expired` until I changed this for my `magiclink`
* Update apps/docs/content/guides/auth/server-side/nextjs.mdx
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
* docs: fix incorrect .js extension with .ts extension
Within the SvelteKit example, the guide incorrectly references creating a .js file as opposed to a .ts as is required, given the contents of said file has Typescript within it
* Update apps/docs/pages/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr.mdx
* run formatter
---------
Co-authored-by: Charis <26616127+charislam@users.noreply.github.com>
Co-authored-by: dshukertjr <dshukertjr@gmail.com>
Begin the process of moving our MDX files into their own content directory.
Fixed a few minor bugs re: ToC and tabs not rerendering consistently on page navigation. (The ToC thing wasn't a problem before the refactor, the tabs thing is a problem on prod.)
Moved MDX files can't import their own components, so everything they require needs to be back in the component prop for mdx-remote's serializer. Cleaned this up a bit and lazy-loaded heavy/rare stuff. Also, the component prop doesn't take arbitrary objects (only actual components), so imported data has to be wrapped in a component.