-
Notifications
You must be signed in to change notification settings - Fork 138
Redirect to signup page on deploy if not logged in #7471
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
base: main
Are you sure you want to change the base?
Conversation
deployCTAUrl = `${$metadata.data.loginUrl}?redirect=${deployPageUrl}`; | ||
// For first-time users, redirect to signup flow | ||
// Use admin server's signup endpoint (/auth/signup) for proper signup experience | ||
deployCTAUrl = `${$metadata.data.adminUrl}/auth/signup?redirect=${deployPageUrl}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious for everyone's thoughts on this - I've appended /signup with adminUrl to this line here when user isn't logged in. Eric O and Mike requested that we land users on the sign-up page in the Rill Developer when they deploy the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could turn it into a condition statement to only apply adminUrl with /signup in the cloud environments and remain using loginUrl in the dev environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Login doesn't actually work during deploy. Logout from everything, cli and browser, clicking deploy doesnt really redirect back with login status after logging in.
The local server needs to be hit before the admin endpoint. It needs to get the callback 1st to actually get the token as well. loginUrl
has the local endpoint here, so we cant just use adminUrl
. Check the handler for more info: https://github.com/rilldata/rill/blob/main/cli/pkg/local/server.go#L768
@k-anshul Any quick path here?
So if i understand this correctly, we will re-direct all non-logged-in users to the signup page during the deploy journey regardless of whether they are first time users or returning users right? I think that's okay for now. According to the team, most returning users will be logged in so they won't even see the Auth0 page. In the near future, it might be good to build that intermediary page with both login and signup options |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Yes!
Okay! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check my other comment. This breaks login flow during deploy for existing users.
@@ -53,7 +53,8 @@ | |||
$: deployPageUrl = `${$page.url.protocol}//${$page.url.host}/deploy`; | |||
$: if (userNotLoggedIn && $metadata.data) { | |||
deployCTAUrl = `${$metadata.data.loginUrl}?redirect=${deployPageUrl}`; | |||
// FIXME: implement signupUrl | |||
deployCTAUrl = `${$metadata.data.signupUrl}?redirect=${deployPageUrl}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if we could use a $metadata.data.signupUrl
here
Closes https://linear.app/rilldata/issue/APP-28/make-sure-that-sign-up-is-the-default-auth0-universal-login-page-when
This pull request modifies the authentication flow to automatically redirect to /auth/signup instead of the /auth or /auth/login. One downside is that if localhost:8080 isn't up, the local auth0 server won't be redirected to the sign up page.
Reviewers, to test this locally
CleanShot.2025-06-17.at.13.25.27.mp4
Checklist: