@stackframe/stack 2.6.32 → 2.6.34
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/CHANGELOG.md +18 -0
- package/dist/components-page/stack-handler.js +13 -3
- package/dist/components-page/stack-handler.js.map +1 -1
- package/dist/esm/components-page/stack-handler.js +13 -3
- package/dist/esm/components-page/stack-handler.js.map +1 -1
- package/dist/esm/generated/global-css.js +1 -1
- package/dist/esm/generated/global-css.js.map +1 -1
- package/dist/esm/lib/stack-app.js +15 -8
- package/dist/esm/lib/stack-app.js.map +1 -1
- package/dist/generated/global-css.d.mts +1 -1
- package/dist/generated/global-css.d.ts +1 -1
- package/dist/generated/global-css.js +1 -1
- package/dist/generated/global-css.js.map +1 -1
- package/dist/generated/quetzal-translations.d.mts +2 -2
- package/dist/generated/quetzal-translations.d.ts +2 -2
- package/dist/lib/stack-app.d.mts +3 -1
- package/dist/lib/stack-app.d.ts +3 -1
- package/dist/lib/stack-app.js +15 -8
- package/dist/lib/stack-app.js.map +1 -1
- package/package.json +4 -4
|
@@ -25,7 +25,7 @@ import { constructRedirectUrl } from "../utils/url";
|
|
|
25
25
|
import { addNewOAuthProviderOrScope, callOAuthCallback, signInWithOAuth } from "./auth";
|
|
26
26
|
import { createBrowserCookieHelper, createCookieHelper, deleteCookieClient, getCookieClient, setOrDeleteCookie, setOrDeleteCookieClient } from "./cookie";
|
|
27
27
|
var NextNavigation = scrambleDuringCompileTime(NextNavigationUnscrambled);
|
|
28
|
-
var clientVersion = "js @stackframe/stack@2.6.
|
|
28
|
+
var clientVersion = "js @stackframe/stack@2.6.34";
|
|
29
29
|
function getUrls(partial) {
|
|
30
30
|
const handler = partial.handler ?? "/handler";
|
|
31
31
|
const home = partial.home ?? "/";
|
|
@@ -116,7 +116,7 @@ function useAsyncCache(cache, dependencies, caller) {
|
|
|
116
116
|
}
|
|
117
117
|
return result.data;
|
|
118
118
|
}
|
|
119
|
-
var stackAppInternalsSymbol = Symbol.for("StackAppInternals");
|
|
119
|
+
var stackAppInternalsSymbol = Symbol.for("StackAuth--DO-NOT-USE-OR-YOU-WILL-BE-FIRED--StackAppInternals");
|
|
120
120
|
var allClientApps = /* @__PURE__ */ new Map();
|
|
121
121
|
var createCache = (fetcher) => {
|
|
122
122
|
return new AsyncCache(
|
|
@@ -673,8 +673,8 @@ var _StackClientAppImpl = class __StackClientAppImpl {
|
|
|
673
673
|
await app._refreshUser(session);
|
|
674
674
|
return registrationResult;
|
|
675
675
|
},
|
|
676
|
-
signOut() {
|
|
677
|
-
return app._signOut(session);
|
|
676
|
+
signOut(options) {
|
|
677
|
+
return app._signOut(session, options);
|
|
678
678
|
}
|
|
679
679
|
};
|
|
680
680
|
}
|
|
@@ -1240,18 +1240,22 @@ var _StackClientAppImpl = class __StackClientAppImpl {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
return false;
|
|
1242
1242
|
}
|
|
1243
|
-
async _signOut(session) {
|
|
1243
|
+
async _signOut(session, options) {
|
|
1244
1244
|
await this._interface.signOut(session);
|
|
1245
|
-
|
|
1245
|
+
if (options?.redirectUrl) {
|
|
1246
|
+
await _redirectTo(options.redirectUrl);
|
|
1247
|
+
} else {
|
|
1248
|
+
await this.redirectToAfterSignOut();
|
|
1249
|
+
}
|
|
1246
1250
|
}
|
|
1247
1251
|
async _sendVerificationEmail(email, session) {
|
|
1248
1252
|
const emailVerificationRedirectUrl = constructRedirectUrl(this.urls.emailVerification);
|
|
1249
1253
|
return await this._interface.sendVerificationEmail(email, emailVerificationRedirectUrl, session);
|
|
1250
1254
|
}
|
|
1251
|
-
async signOut() {
|
|
1255
|
+
async signOut(options) {
|
|
1252
1256
|
const user = await this.getUser();
|
|
1253
1257
|
if (user) {
|
|
1254
|
-
await user.signOut();
|
|
1258
|
+
await user.signOut(options);
|
|
1255
1259
|
}
|
|
1256
1260
|
}
|
|
1257
1261
|
async getProject() {
|
|
@@ -1343,6 +1347,9 @@ var _StackClientAppImpl = class __StackClientAppImpl {
|
|
|
1343
1347
|
runAsynchronously(async () => {
|
|
1344
1348
|
await this._currentUserCache.forceSetCachedValueAsync([await this._getSession()], Result.fromPromise(userJsonPromise));
|
|
1345
1349
|
});
|
|
1350
|
+
},
|
|
1351
|
+
sendRequest: async (path, requestOptions, requestType = "client") => {
|
|
1352
|
+
return await this._interface.sendClientRequest(path, requestOptions, await this._getSession(), requestType);
|
|
1346
1353
|
}
|
|
1347
1354
|
};
|
|
1348
1355
|
}
|