rkljw 4 өдөр өмнө
parent
commit
9c8959adec
1 өөрчлөгдсөн 7 нэмэгдсэн , 1 устгасан
  1. 7 1
      src/utils/auth.js

+ 7 - 1
src/utils/auth.js

@@ -93,13 +93,19 @@ export function hashParams() {
   const hash = url.hash;
   const hashParams = new URLSearchParams(hash.split('?')[1]);
   const userurl = hashParams.get('userurl');
-
+  const backurl = hashParams.get('backurl');
   if (userurl) {
     // Create a URL object to extract the domain
     const userUrlObject = new URL(userurl);
     return userUrlObject.hostname; // Return only the domain
   }
 
+  if (backurl) {
+    // Create a URL object to extract the domain
+    const backUrlObject = new URL(backurl);
+    return backUrlObject.hostname; // Return only the domain  
+  }
+
   return null; // Return null if userurl is not present
 }