Skip to content

Instantly share code, notes, and snippets.

@putrikarunia
Created May 12, 2020 21:00
Show Gist options
  • Save putrikarunia/6e1a77444205d94e78afdc5a7e63ce7a to your computer and use it in GitHub Desktop.
Save putrikarunia/6e1a77444205d94e78afdc5a7e63ce7a to your computer and use it in GitHub Desktop.
// 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