-
Notifications
You must be signed in to change notification settings - Fork 914
feat: implement sign up with GitHub for the first user #16629
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
Conversation
5fb6932
to
a4258c7
Compare
b16682c
to
2473a5e
Compare
dab3105
to
be8cca1
Compare
2473a5e
to
1055883
Compare
be8cca1
to
cfc3645
Compare
1055883
to
484afd4
Compare
484afd4
to
9549df5
Compare
By the way, you can test the changes locally by starting the coder server like this:
|
PS Once I get a full build running and auth with your client ID I get: |
I tested using |
@dannykopping yes - only the first user can be created by default. This matches how Coder works currently. Tu use
|
Sweet 👌 works nicely |
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, I did not test it though
@@ -198,6 +200,7 @@ func (api *API) postFirstUser(rw http.ResponseWriter, r *http.Request) { | |||
OrganizationIDs: []uuid.UUID{defaultOrg.ID}, | |||
}, | |||
LoginType: database.LoginTypePassword, | |||
RBACRoles: []string{rbac.RoleOwner().String()}, |
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.
❤️
onChangeTrimmed(form)(event); | ||
}, | ||
[form], | ||
); |
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.
IMO, there is no need to use useCallback
since the function is not used as a dependency in an effect and the function doesn't look heavy for optimization.
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.
moved it out of useCallback
<div className="shrink-0 text-xs uppercase text-content-secondary tracking-wider"> | ||
or | ||
</div> | ||
<div className="h-[1px] w-full bg-divider" /> |
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.
We don't use the token divider so you could use bg-border-default
. Let me know in case it does not look good.
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 added support for the divider token to mirror the color palette of the sign in screen exactly. Would you like me to remove it?
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.
Yes please, since we don't use it in our design system.
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.
1a67ae7
to
dfd49d0
Compare
dfd49d0
to
3b36025
Compare
Second PR to address #16230. See the issue for more context and discussion.
It adds a "Continue with GitHub" button to the
/setup
page, so the deployment's admin can sign up with it. It also removes the "Username" and "Full Name" fields to make signing up with email faster. In the email flow, the username is now auto-generated based on the email, and full name is left empty.There's a separate, follow up issue to visually align the
/setup
page with the new design system: #16653