-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcallback.html
More file actions
30 lines (27 loc) · 1.03 KB
/
callback.html
File metadata and controls
30 lines (27 loc) · 1.03 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Callback</title>
</head>
<body>
<h1>Processing...</h1>
<!-- Include the Auth0 JS SDK -->
<script src="https://cdn.auth0.com/js/auth0-spa-js/1.19/auth0-spa-js.production.js"></script>
<script>
// Wrap the callback handling in an async function
(async function handleRedirectCallback() {
const auth0 = await createAuth0Client({
domain: 'dev-qirtwh6cktfuc8ap.us.auth0.com',
client_id: 'CmiF5zKFREhl7eEmcL8p2z5vkU8Fbzk5',
redirect_uri: window.location.origin + '/callback'
});
// Process the callback and get the authentication result
await auth0.handleRedirectCallback();
// Redirect to a specific URL on the internet
window.location.href = 'https://www.example.com'; // Replace with the desired URL
})();
</script>
</body>
</html>