Comparing version 0.1.5 to 0.1.6
@@ -55,2 +55,5 @@ "use strict"; | ||
} | ||
function logOut() { | ||
system_1.default.nexus.logOut(); | ||
} | ||
const auth = { | ||
@@ -61,3 +64,4 @@ getUser, | ||
getOrganization, | ||
logOut, | ||
}; | ||
exports.default = Object.freeze(auth); |
@@ -7,2 +7,3 @@ import { IModuleLink, IUser, IUserEntity } from 'bf-types'; | ||
getOrganization(): Promise<IModuleLink>; | ||
logOut(): void; | ||
} |
@@ -7,3 +7,4 @@ import { IUserEntity } from 'bf-types'; | ||
getUser(): IUserEntity; | ||
logOut(): void; | ||
} | ||
export default function nexus(config: NexusConfig, client: ClientConfig): Promise<Nexus>; |
@@ -27,5 +27,11 @@ "use strict"; | ||
} | ||
function logOut() { | ||
if (client.type === common_1.ClientType.BROWSER && typeof window !== 'undefined') { | ||
window.location.href = `${baseUrl}/logout?returnUrl=${window.location.href}`; | ||
} | ||
} | ||
const instance = { | ||
getUrl, | ||
getLoginUrl, | ||
logOut, | ||
}; | ||
@@ -32,0 +38,0 @@ try { |
{ | ||
"name": "bf-lib", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "the standard client library for block-5 services", | ||
@@ -5,0 +5,0 @@ "main": "lib/index", |
33774
777