@cloudbase/oauth
Advanced tools
Comparing version 1.3.8-beta to 1.3.9-beta
@@ -37,8 +37,15 @@ "use strict"; | ||
const openURL = new URL(url); | ||
const redirectUri = openURL.searchParams.get('redirect_uri'); | ||
let search = openURL.search.substring(1); | ||
let contactSign = "?"; | ||
if (openURL.hash.indexOf('=') > 0) { | ||
search = openURL.hash.substring(1); | ||
contactSign = "#"; | ||
} | ||
const searchParams = new URLSearchParams(search); | ||
const redirectUri = searchParams.get('redirect_uri'); | ||
if (redirectUri) { | ||
const redirectUrl = new URL(redirectUri); | ||
redirectUrl.searchParams.append(iframeTag, "on"); | ||
openURL.searchParams.set('redirect_uri', redirectUrl.href); | ||
url = openURL.href; | ||
searchParams.set('redirect_uri', redirectUrl.href); | ||
url = openURL.origin + openURL.pathname + contactSign + searchParams.toString(); | ||
} | ||
@@ -45,0 +52,0 @@ iframe.setAttribute('src', url); |
{ | ||
"name": "@cloudbase/oauth", | ||
"version": "1.3.8-beta", | ||
"version": "1.3.9-beta", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
134350
2834