File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ <html lang="en">
3+ <head>
4+ <meta charset="UTF-8">
5+ <title>Bluesky OAuth Redirect</title>
6+ <meta name="viewport" content="width=device-width,initial-scale=1">
7+ <style>
8+ body { font-family: sans-serif; display:flex; align-items:center; justify-content:center; height:100vh; margin:0; }
9+ </style>
10+ </head>
11+ <body>
12+ <p id="status">Redirecting…</p>
13+ <script>
14+ (function() {
15+ function getQueryAndHash() {
16+ const search = window.location.search; // includes "?"
17+ const hash = window.location.hash; // includes "#"
18+ if (search && search.length > 1) {
19+ return search; // ?code=...&state=...
20+ }
21+ if (hash && hash.length > 1) {
22+ return '?' + hash.substring(1); // #code=... -> ?code=...
23+ }
24+ return '';
25+ }
26+
27+ const params = getQueryAndHash();
28+ const target = 'flare://Callback/SignIn/Bluesky' + params;
29+
30+ try {
31+ // Replace current history entry so back button doesn’t return here
32+ window.location.replace(target);
33+ } catch (_) {
34+ // Fallback for browsers that block automatic custom‑scheme redirects
35+ const status = document.getElementById('status');
36+ status.innerHTML = 'If you are not redirected automatically, <a href="' + target + '">tap here</a>.';
37+ }
38+ })();
39+ </script>
40+ </body>
41+ </html>
You can’t perform that action at this time.
0 commit comments