Support loginToken query in History

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-08-01 13:54:16 +05:30
parent 74f5e30487
commit bed0185186

View file

@ -25,6 +25,14 @@ export class History extends BaseObservableValue {
}
get() {
/*
All URLS in Hydrogen will use <root>/#/segment/value/...
But for SSO, we need to handle <root>/?loginToken=<TOKEN>
Handle that as a special case for now.
*/
if (document.location.search.includes("loginToken")) {
return document.location.search;
}
return document.location.hash;
}