-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth.html
33 lines (31 loc) · 860 Bytes
/
auth.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Authentication Request</title>
</head>
<body>
<div>
<p>
Redirecting your authentication request to the mobile app.
</p>
<p>
If you are not automatically redirected, please visit:
<a id="redurl" href=""></a>
</p>
</div>
<script>
const currentUrl = new URL(window.location)
const deepLinkUrl = new URL('dccrequest://oauth')
// Copy the query params of the current page to the deep link
deepLinkUrl.search = currentUrl.search
// Update the message displayed to the user
const link = document.getElementById('redurl')
link.innerHTML = deepLinkUrl
link.href = deepLinkUrl
// Redirect the user to the new deeplink url
window.location.href = deepLinkUrl
</script>
</body>
</html>