Commit 822ee60
fix webAuthn insecure error view (go-gitea#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.

Signed-off-by: a1012112796 <[email protected]>
Co-authored-by: Lunny Xiao <[email protected]>1 parent da08727 commit 822ee60
1 file changed
+1
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 14 | | |
| 15 | + | |
21 | 16 | | |
22 | 17 | | |
23 | 18 | | |
| |||
0 commit comments