mirror of
https://github.com/Dan6erbond/sk-auth.git
synced 2025-04-23 01:16:26 +02:00
20 lines
541 B
JavaScript
20 lines
541 B
JavaScript
'use strict';
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
async function signOut(config) {
|
|
let res = await fetch(mergePath(["/api/auth", config?.basePath ?? null], "signout"), {
|
|
method: "POST"
|
|
});
|
|
const { signout } = await res.json();
|
|
if (!signout) {
|
|
throw new Error("Sign out not successful!");
|
|
}
|
|
res = await fetch(mergePath(["/api/auth", config?.basePath ?? null], "session"));
|
|
const session = await res.json();
|
|
return session;
|
|
}
|
|
|
|
exports.signOut = signOut;
|
|
//# sourceMappingURL=signOut.js.map
|