@sanvika/auth 2.5.1 → 2.5.3
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 +2 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -274,7 +274,8 @@ function SanvikaAccountButtonContent({
|
|
|
274
274
|
setImgError(false);
|
|
275
275
|
}
|
|
276
276
|
if (!isAuthenticated || loading) {
|
|
277
|
-
const { clientId
|
|
277
|
+
const { clientId } = auth;
|
|
278
|
+
const redirectUri = auth.redirectUri || (typeof window !== "undefined" && window.location ? window.location.origin + "/auth/callback" : "");
|
|
278
279
|
const authorizeUrl = clientId && redirectUri ? `${S_AUTH_URL2}/authorize?client_id=${encodeURIComponent(clientId)}&redirect_uri=${encodeURIComponent(redirectUri)}` : `${S_AUTH_URL2}/authorize`;
|
|
279
280
|
return /* @__PURE__ */ jsxs(
|
|
280
281
|
"button",
|