- Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogin.html
37 lines (36 loc) · 1.31 KB
/
login.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
33
34
35
36
37
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8" />
<title>Example for Client-Server UID2 SDK Integration with Google Secure Signals</title>
<linkrel="stylesheet" type="text/css" href="/stylesheets/app.css" />
<linkrel="shortcut icon" href="/images/favicon.png" />
<scriptasyncsrc="https://cdn.integ.uidapi.com/uid2SecureSignal.js"></script>
<scriptasyncsrc="<%- uid2JsSdkUrl %>"></script>
<scriptasyncsrc="https://securepubads.g.doubleclick.net/tag/js/gpt.js"></script>
<script>
window.__uid2=window.__uid2||{callbacks: []};
window.__uid2.callbacks.push((eventType,payload)=>{
if(eventType==='SdkLoaded'){
__uid2.init({
baseUrl: "<%- uid2BaseUrl %>",
});
}
if(eventType==='InitCompleted'){
if(__uid2.isLoginRequired())__uid2.setIdentity(<%-JSON.stringify(identity)%>)
}
});
</script>
</head>
<body>
<%- include('intro.html'); -%>
<pclass="message">Login completed</p>
<p>UID2 identity:</p>
<pre><%- JSON.stringify(identity, null, 2) %></pre>
<p><ahref="/">Back to the main page</a></p>
<p>
Normally user would be redirected automatically, but this example demonstrates one way UID2
login could be handled.
</p>
</body>
</html>