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
|
|
@ -8,13 +8,17 @@ export interface LocalLogoutResult {
|
|||
* Attempts server-side refresh-token revocation first, then always performs
|
||||
* the caller's local secure purge. A network outage must not trap a user in a
|
||||
* signed-in device or leave a reusable refresh token in local storage.
|
||||
*
|
||||
* Only this device's session is revoked (scope 'local'). The auth client's
|
||||
* default scope is 'global', which revoked every refresh token of the account
|
||||
* and silently signed the user out of their desktops as well.
|
||||
*/
|
||||
export async function signOutWithLocalFallback(
|
||||
purgeLocalSession: () => Promise<void>,
|
||||
): Promise<LocalLogoutResult> {
|
||||
let remoteRevocationConfirmed = false
|
||||
try {
|
||||
const { error } = await supabase.auth.signOut()
|
||||
const { error } = await supabase.auth.signOut({ scope: 'local' })
|
||||
remoteRevocationConfirmed = error === null
|
||||
} catch {
|
||||
remoteRevocationConfirmed = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue