Last active
January 9, 2022 10:00
-
-
Save truongnmt/eedb1a91cd1fc169931c85423ed5fc2b to your computer and use it in GitHub Desktop.
new_registration_controller.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create(event) { | |
var [data, status, xhr] = event.detail; | |
console.log(data); | |
var credentialOptions = data; | |
// Registration | |
if (credentialOptions["user"]) { | |
var credential_nickname = event.target.querySelector("input[name='registration[nickname]']").value; | |
var callback_url = `/registration/callback?credential_nickname=${credential_nickname}` | |
Credential.create(encodeURI(callback_url), credentialOptions); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment