Created
May 12, 2020 21:00
-
-
Save putrikarunia/6e1a77444205d94e78afdc5a7e63ce7a to your computer and use it in GitHub Desktop.
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
// 2️⃣ onLogin: Sign In with Device | |
const onLogin = () => { | |
var cotter = new Cotter( | |
API_KEY_ID, // 👈 Specify your API KEY ID here | |
email, | |
); | |
cotter.trustedDevice.requestAuth( | |
'LOGIN', | |
(resp) => { alert('Login Success'), console.log(resp) }, | |
(errMsg, err) => { alert(errMsg), console.log(err) }, | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment