auth0-js
Version:
Auth0 headless browser sdk
32 lines (24 loc) • 511 B
JavaScript
import objectHelper from './object';
function redirect(url) {
getWindow().location = url;
}
function getDocument() {
return getWindow().document;
}
function getWindow() {
return window;
}
function getOrigin() {
var location = getWindow().location;
var origin = location.origin;
if (!origin) {
origin = objectHelper.getOriginFromUrl(location.href);
}
return origin;
}
export default {
redirect: redirect,
getDocument: getDocument,
getWindow: getWindow,
getOrigin: getOrigin
};