You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<strong>Debug:</strong> Token ready for Chrome extension capture
15
+
</div>
16
+
</div>
17
+
</div>
18
+
19
+
<script>
20
+
// For chrome.identity.launchWebAuthFlow to work, we need to redirect to
21
+
// the same URL with the token as a query parameter
22
+
(function(){
23
+
constcurrentUrl=newURL(window.location.href);
24
+
25
+
// Check if token is already in URL (to prevent redirect loop)
26
+
if(currentUrl.searchParams.has('token')){
27
+
console.log('Token already in URL, Chrome extension should capture this');
28
+
// chrome.identity.launchWebAuthFlow will intercept and close the window
29
+
// If window doesn't close after 2 seconds, show a message
30
+
setTimeout(()=>{
31
+
document.body.innerHTML='<div class="flex items-center justify-center py-12"><div class="text-center"><p class="text-gray-600">You can close this window now.</p></div></div>';
32
+
},2000);
33
+
return;
34
+
}
35
+
36
+
// Token not in URL yet, add it and redirect once
37
+
consttoken='<%=j@token%>';
38
+
if(token){
39
+
console.log('Adding token to URL for Chrome extension capture');
0 commit comments