-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (28 loc) · 1.11 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="https://cdn.mojoauth.com/js/mojoauth.min.js"></script>
<link rel="stylesheet" href="./index.css">
<title>MojoAuth Demo | Secure and Delightful Passwordless Login Solution</title>
<link rel="icon" href="https://mojoauth.com/favicon.ico" />
</head>
<body>
<div id="mojoauth-passwordless-form"></div>
<div id="user-profile"></div>
<script>
config={
language: "en",
redirect_url: "/profile",
source: source= [ {type:'email',feature:'magiclink'}],
email_input_id:"email-input-id",
}
const mojoauth = new MojoAuth( "b4dfd4bf-acb5-4f05-a430-245a982bb04a", config);
mojoauth.signIn().then( response => {
console.log("reached here")
sessionStorage.setItem("access_token", response.oauth.access_token)
sessionStorage.setItem("identifier", response.user.identifier)
console.log( response )
window.location.replace("/profile")
} );
</script>
</html>