You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
package authn
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"github.com/duo-labs/webauthn/webauthn"
|
|
|
|
)
|
|
|
|
|
|
|
|
var AuthnInstance *webauthn.WebAuthn
|
|
|
|
|
|
|
|
func Init() {
|
|
|
|
var err error
|
|
|
|
AuthnInstance, 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)
|
|
|
|
}
|
|
|
|
}
|