u2f-api script should be moved to npm/webpack #8129

Closed
opened 2025-11-02 07:54:39 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @silverwind on GitHub (Nov 18, 2021).

Feature Description

There is a unversioned copy of what I think is a minified version of u2f-api that came in https://github.com/go-gitea/gitea/pull/3971. It should be moved to npm/webpack to become maintainable.

Maybe @jonasfranz can point out the source/version of this script.

Originally created by @silverwind on GitHub (Nov 18, 2021). ### Feature Description There is a [unversioned copy](https://github.com/go-gitea/gitea/blob/main/public/vendor/plugins/u2f/index.js) of what I think is a minified version of [`u2f-api`](https://github.com/grantila/u2f-api) that came in https://github.com/go-gitea/gitea/pull/3971. It should be moved to npm/webpack to become maintainable. Maybe @jonasfranz can point out the source/version of this script.
Author
Owner

@wxiaoguang commented on GitHub (Nov 18, 2021):

I believe the code comes from https://github.com/github/u2f-api/blob/master/u2f-api-polyfill.js and its fork like https://github.com/grantila/u2f-api

Some fingerprints:

"U2F isn't supported over http, only https"
"U2F not supported"
ensureSupport
isSupported
formatRegisterRequest_

And most u2f-api we can find in npm they are all copied and modified from the same origin, they share same API interfaces, like:

@wxiaoguang commented on GitHub (Nov 18, 2021): I believe the code comes from https://github.com/github/u2f-api/blob/master/u2f-api-polyfill.js and its fork like https://github.com/grantila/u2f-api Some fingerprints: ``` "U2F isn't supported over http, only https" "U2F not supported" ensureSupport isSupported formatRegisterRequest_ ``` And most u2f-api we can find in npm they are all copied and modified from the same origin, they share same API interfaces, like: * https://www.npmjs.com/package/u2f * https://www.npmjs.com/package/u2f-api
Author
Owner

@wxiaoguang commented on GitHub (Nov 22, 2021):

As reported in

Maybe we should refactor this module too.

@wxiaoguang commented on GitHub (Nov 22, 2021): As reported in * https://github.com/go-gitea/gitea/issues/17754 Maybe we should refactor this module too.
Author
Owner

@silverwind commented on GitHub (Nov 22, 2021):

I think it needs to be changed to use webauthn, see https://github.com/go-gitea/gitea/issues/6892.

@silverwind commented on GitHub (Nov 22, 2021): I think it needs to be changed to use webauthn, see https://github.com/go-gitea/gitea/issues/6892.
Author
Owner

@lunny commented on GitHub (Nov 22, 2021):

@silverwind So maybe we could close this one and just continue in #6892, we could remove u2f-api and introduce webauthn in the same PR.

@lunny commented on GitHub (Nov 22, 2021): @silverwind So maybe we could close this one and just continue in #6892, we could remove u2f-api and introduce webauthn in the same PR.
Author
Owner

@silverwind commented on GitHub (Nov 22, 2021):

Yes, u2f removal can come with the webauthn addition.

@silverwind commented on GitHub (Nov 22, 2021): Yes, u2f removal can come with the webauthn addition.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8129