mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Signout now works correctly with old cookies
This commit is contained in:
parent
a44282239e
commit
50b2b672eb
@ -98,6 +98,8 @@ pnpm run prisma:server migrate reset
|
||||
pnpm run dev
|
||||
```
|
||||
|
||||
You can now open the dashboard at [http://localhost:8101](http://localhost:8101), demo on port 8103, and docs on port 8104.
|
||||
|
||||
Your IDE may show an error on all `@stackframe/XYZ` imports. To fix this, simply restart the TypeScript language server; for example, in VSCode you can open the command palette (Ctrl+Shift+P) and run `Developer: Reload Window` or `TypeScript: Restart TS server`.
|
||||
|
||||
You can also open Prisma Studio to see the database interface and edit data directly:
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import React, { use, useCallback, useMemo } from "react";
|
||||
import { KnownError, KnownErrors, OAuthProviderConfigJson, ServerUserJson, StackAdminInterface, StackClientInterface, StackServerInterface } from "@stackframe/stack-shared";
|
||||
import { getCookie, setOrDeleteCookie } from "./cookie";
|
||||
import { deleteCookie, getCookie, setOrDeleteCookie } from "./cookie";
|
||||
import { StackAssertionError, throwErr } from "@stackframe/stack-shared/dist/utils/errors";
|
||||
import { generateUuid } from "@stackframe/stack-shared/dist/utils/uuids";
|
||||
import { AsyncResult, Result } from "@stackframe/stack-shared/dist/utils/results";
|
||||
@ -440,6 +440,7 @@ class _StackClientAppImpl<HasTokenStore extends boolean, ProjectId extends strin
|
||||
try {
|
||||
setOrDeleteCookie(this._refreshTokenCookieName, value.refreshToken, { maxAge: 60 * 60 * 24 * 365 });
|
||||
setOrDeleteCookie(this._accessTokenCookieName, value.accessToken, { maxAge: 60 * 60 * 24 });
|
||||
deleteCookie('stack-refresh'); // delete cookie name from previous versions (for backwards-compatibility)
|
||||
hasSucceededInWriting = true;
|
||||
} catch (e) {
|
||||
if (!isBrowserLike()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user