We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5645307 commit bf2070dCopy full SHA for bf2070d
packages/auth/src/platform_browser/index.ts
@@ -90,7 +90,9 @@ export function getAuth(app: FirebaseApp = getApp()): Auth {
90
});
91
92
const authTokenSyncPath = getExperimentalSetting('authTokenSyncURL');
93
+ // Only do the Cookie exchange in a secure context
94
if (authTokenSyncPath && isSecureContext) {
95
+ // Don't allow urls (XSS possibility), only paths on the same domain
96
const authTokenSyncUrl = new URL(authTokenSyncPath, location.origin);
97
if (location.origin === authTokenSyncUrl.origin) {
98
const mintCookie = mintCookieFactory(authTokenSyncUrl.toString());
0 commit comments