@sanvika/auth 1.0.13 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -172,9 +172,11 @@ function SanvikaAuthProvider({
|
|
|
172
172
|
if (token) {
|
|
173
173
|
fetch(`${iamUrl}/api/auth/logout`, {
|
|
174
174
|
method: "POST",
|
|
175
|
-
headers: {
|
|
176
|
-
|
|
177
|
-
|
|
175
|
+
headers: {
|
|
176
|
+
"Content-Type": "application/json",
|
|
177
|
+
Authorization: `Bearer ${token}`
|
|
178
|
+
},
|
|
179
|
+
body: JSON.stringify({ logout_all: false })
|
|
178
180
|
}).catch(() => {
|
|
179
181
|
});
|
|
180
182
|
}
|
|
@@ -512,7 +514,7 @@ function SanvikaAccountButton({
|
|
|
512
514
|
/* @__PURE__ */ jsxs(
|
|
513
515
|
"a",
|
|
514
516
|
{
|
|
515
|
-
href: `https://accounts.sanvikaproduction.com/dashboard/user-profile?token=${encodeURIComponent(accessToken || "")}`,
|
|
517
|
+
href: `https://accounts.sanvikaproduction.com/dashboard/user-profile?token=${encodeURIComponent(accessToken || "")}&origin=${encodeURIComponent(window.location.origin)}`,
|
|
516
518
|
className: "snvk-dropdownItem",
|
|
517
519
|
role: "menuitem",
|
|
518
520
|
onClick: () => setDropdownOpen(false),
|
|
@@ -525,7 +527,7 @@ function SanvikaAccountButton({
|
|
|
525
527
|
/* @__PURE__ */ jsxs(
|
|
526
528
|
"a",
|
|
527
529
|
{
|
|
528
|
-
href: onboardingPath && user.status === "onboarding" ? onboardingPath : `https://accounts.sanvikaproduction.com/dashboard?token=${encodeURIComponent(accessToken || "")}`,
|
|
530
|
+
href: onboardingPath && user.status === "onboarding" ? onboardingPath : `https://accounts.sanvikaproduction.com/dashboard?token=${encodeURIComponent(accessToken || "")}&origin=${encodeURIComponent(window.location.origin)}`,
|
|
529
531
|
className: "snvk-dropdownItem",
|
|
530
532
|
role: "menuitem",
|
|
531
533
|
onClick: () => setDropdownOpen(false),
|