fix(desktop): harden session, meeting, caption and LLM lifecycles; route LLM calls through the gateway
This commit is contained in:
parent
3a46437f28
commit
ddc78546f0
62 changed files with 4786 additions and 648 deletions
24
apps/mobile-rn/__tests__/logout-scope-redteam-r2-1.test.ts
Normal file
24
apps/mobile-rn/__tests__/logout-scope-redteam-r2-1.test.ts
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// 로그아웃은 이 기기의 세션만 폐기한다(scope 'local').
|
||||
// 기본값 'global' 은 계정의 모든 refresh token 을 폐기해 데스크톱까지 로그아웃시켰다.
|
||||
const mockSignOut = jest.fn()
|
||||
|
||||
jest.mock('../src/lib/supabase', () => ({
|
||||
supabase: {
|
||||
auth: {
|
||||
signOut: (...args: unknown[]) => mockSignOut(...args),
|
||||
},
|
||||
},
|
||||
}))
|
||||
|
||||
import { signOutWithLocalFallback } from '../src/lib/logout'
|
||||
|
||||
describe('per-device logout scope', () => {
|
||||
beforeEach(() => jest.clearAllMocks())
|
||||
|
||||
test('revokes only this device session, never the whole account', async () => {
|
||||
mockSignOut.mockResolvedValue({ error: null })
|
||||
await signOutWithLocalFallback(jest.fn(async () => undefined))
|
||||
expect(mockSignOut).toHaveBeenCalledTimes(1)
|
||||
expect(mockSignOut).toHaveBeenCalledWith({ scope: 'local' })
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue