Feat experimental WebAuth API

This commit is contained in:
HFO4 committed 2019-12-08 22:17:36 +08:00
1 parent 0932a10fed
commit f35c585edf
14 files changed
+269 -6

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
package authn
import (
"fmt"
"github.com/duo-labs/webauthn/webauthn"
)
var Authn *webauthn.WebAuthn
func Init() {
var err error
Authn, err = webauthn.New(&webauthn.Config{
RPDisplayName: "Duo Labs", // Display Name for your site
RPID: "localhost", // Generally the FQDN for your site
RPOrigin: "http://localhost:3000", // The origin URL for WebAuthn requests
RPIcon: "https://duo.com/logo.png", // Optional icon URL for your site
})
if err != nil {
fmt.Println(err)
}
}