Skip to content

Instantly share code, notes, and snippets.

@c10r
Created May 24, 2020 17:44
Show Gist options
  • Save c10r/81ed872b8eca0eaa938bcc4b0b80cac8 to your computer and use it in GitHub Desktop.
Save c10r/81ed872b8eca0eaa938bcc4b0b80cac8 to your computer and use it in GitHub Desktop.
try {
const setupResult = await Auth.signUp({
username: email,
password,
attributes: {
email,
},
})
// This will fail
const code = await Auth.setupTOTP(setupResult.user)
createQrCode(code)
} catch (error) {
console.log("error signing up:", error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment