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

Add Passkey login support #31504

Merged
merged 10 commits into from
Jun 29, 2024
Merged

Add Passkey login support #31504

merged 10 commits into from
Jun 29, 2024

Conversation

anbraten
Copy link
Contributor

@anbraten anbraten commented Jun 26, 2024

closes #22015

After adding a passkey, you can now simply login with it directly by clicking Sign in with a passkey.

Screenshot from 2024-06-26 12-18-17

Note for testing. You need to run gitea using https to get the full passkeys experience.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 26, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 26, 2024
@github-actions github-actions bot added modifies/translation modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/js labels Jun 26, 2024
@silverwind
Copy link
Member

Unrelated, but I see we need to increase contrast on these error message headers :)

@silverwind silverwind added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jun 26, 2024
Copy link
Member

@silverwind silverwind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks alright, but I have not tested it.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jun 27, 2024
@lunny
Copy link
Member

lunny commented Jun 28, 2024

Thank you for your contributions. But I don't think the login UI is ideal. Maybe we can have a redesign because of Passkey login supported?

@lunny lunny added this to the 1.23.0 milestone Jun 28, 2024
@anbraten
Copy link
Contributor Author

anbraten commented Jun 28, 2024

Thank you for your contributions. But I don't think the login UI is ideal. Maybe we can have a redesign because of Passkey login supported?

Sure, I am open for suggestions.

Using a link seemedd nice as it isn't to dominated compared to another button as not every system is supporting passkeys yet. Mainly orientated on Githubs approach (which seems pretty clean):

image

@silverwind
Copy link
Member

silverwind commented Jun 28, 2024

I think we could do the same and separate the links into a separate box. Moving the "Forget Password" besides the password label is also a good idea to make it look less crammed.

I can help on these parts if you like.

@anbraten
Copy link
Contributor Author

That sounds great. Feel free to push to this PR.

@silverwind
Copy link
Member

I will. Another change I plan is to make the "Sign In" button full width. It'll look better, be easier to click and match the OAuth buttons as well.

routers/web/auth/webauthn.go Show resolved Hide resolved
routers/web/auth/webauthn.go Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jun 28, 2024
@anbraten
Copy link
Contributor Author

@silverwind Did some testing:

image

@lafriks lafriks enabled auto-merge (squash) June 29, 2024 22:22
@lafriks lafriks merged commit 91745ae into go-gitea:main Jun 29, 2024
26 checks passed
@anbraten anbraten deleted the passkeys branch June 30, 2024 06:10
@anbraten anbraten mentioned this pull request Jun 30, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/js modifies/templates This PR modifies the template files modifies/translation size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for passkeys (WebAuthn as primary authentication)
6 participants