mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
Fix more tests
This commit is contained in:
parent
83d4ab27ca
commit
6fb57257d8
@ -204,10 +204,12 @@ export namespace Auth {
|
||||
}
|
||||
|
||||
export async function refreshAccessToken() {
|
||||
const response = await niceBackendFetch("/api/v1/auth/sessions/current/refresh", { method: "POST", accessType: "client" });
|
||||
if (response.status !== 200) {
|
||||
throw new StackAssertionError("Expected session to be valid, but was actually invalid.", { response });
|
||||
}
|
||||
const response = await niceBackendFetch("/api/v1/auth/sessions/current/refresh", {
|
||||
method: "POST",
|
||||
accessType: "client",
|
||||
headers: { "x-stack-access-token": "" },
|
||||
});
|
||||
expect(response).toMatchInlineSnapshot();
|
||||
backendContext.set({ userAuth: { accessToken: response.body.access_token, refreshToken: response.body.refresh_token } });
|
||||
await ensureParsableAccessToken();
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user