Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update code snippet in nextjs server-side auth guide step 7 #26281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RichardHruby
Copy link

I have read the [CONTRIBUTING.md] (https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file.

YES

What kind of change does this PR introduce?

This is an update to the code snippet under Step 7 in the [NextJS server-side auth guide docs] (https://supabase.com/docs/guides/auth/server-side/nextjs?queryGroups=router&router=app).

What is the current behavior?

When deployed via docker (e.g. on GCP Cloud Run), the current example code snippet redirects users upon clicking a "confirm email address link" to the port exposed by the docker container, instead of the root of the deployed application or the specified redirect URL.

E.g. If the app is deployed on https://example.app via GCP Cloud Run with a docker container exposing the app on localhost:3000, when user clicks on https://example.app/auth/confirm?token_hash=pkce_09802jk2349h434239iy849h4&type=signup they will be redirected to localhost:3000/ instead of https://example.app/

What is the new behavior?

The new example code snippet uses redirect() from next/navigation and redirects to the global root of the deployed app, or the specified redirect URL.

Additional context

Detailed description with code snippets and logs in this GitHub issue.

Copy link

vercel bot commented May 14, 2024

@RichardHruby is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

vercel bot commented May 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2024 9:29am
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
studio ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 9:29am
studio-self-hosted ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 9:29am
studio-staging ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 9:29am
zone-www-dot-com ⬜️ Ignored (Inspect) Visit Preview May 17, 2024 9:29am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant