Skip to content

fix webAuthn insecure error view (#36165)#36179

Merged
lunny merged 1 commit intogo-gitea:release/v1.25from
a1012112796:zzc/dev/backport-36165
Dec 17, 2025
Merged

fix webAuthn insecure error view (#36165)#36179
lunny merged 1 commit intogo-gitea:release/v1.25from
a1012112796:zzc/dev/backport-36165

Conversation

@a1012112796
Copy link
Copy Markdown
Member

backport #36165

as you seen, in cureent status `initUserAuthWebAuthn` will prcheck
`window.isSecureContext`, if not ok, will hide the `passkey` btton and
return directly. I think it's not right, first, not show any error
message looks not a good ui, and it's looks will make an empty container
was show if the registion button was disabled also (maybe f-i-x go-gitea#36115),
then initUserAuthWebAuthn has `window.isSecureContext` check also which
looks duplcate ref:

https://github.com/go-gitea/gitea/blob/26602fd2070886a1e7e0545f11f5541a38396003/web_src/js/features/user-auth-webauthn.ts#L202-L206

so I'd like move hideElem(elSignInPasskeyBtn); to
`detectWebAuthnSupport` failed routs to make it simple and show insecure
error corectly.

![联想截图_20251215184757](https://github.com/user-attachments/assets/0eff43a0-18a6-4978-aa27-b4574fcf2601)

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@GiteaBot GiteaBot added this to the 1.25.3 milestone Dec 17, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 17, 2025
@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 Dec 17, 2025
@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 Dec 17, 2025
@lunny lunny merged commit 522cc25 into go-gitea:release/v1.25 Dec 17, 2025
26 checks passed
@a1012112796 a1012112796 deleted the zzc/dev/backport-36165 branch December 18, 2025 00:27
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Mar 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants