feat(admin): журналы входов и изменений с IP/UA и сессиями
Разделены экраны «Входы» и «Изменения»; логин пишет IP/UA и last_login_ip; SSO handoff и revoke refresh-сессий; улучшены audit-карточки. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8b1203f5e9
commit
cc38bf06f8
24 files changed
+1431
-69
No files matched your search
@@ -123,6 +123,22 @@ export async function ssoHandoffReturnTo(returnTo: string): Promise<boolean> {
|
||||
const allowlist = await ensureReturnToAllowlist()
|
||||
if (!isReturnToAllowed(returnTo, allowlist)) return false
|
||||
const issued = await reissueAccessToken()
|
||||
try {
|
||||
const token = getToken()
|
||||
if (token) {
|
||||
void fetch('/api/v1/auth/sso-access', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
body: JSON.stringify({ return_to: returnTo }),
|
||||
keepalive: true,
|
||||
}).catch(() => undefined)
|
||||
}
|
||||
} catch {
|
||||
/* best-effort audit */
|
||||
}
|
||||
window.location.href = buildSsoRedirectUrl(
|
||||
returnTo,
|
||||
issued.access_token,
|
||||
|
||||
Reference in new issue
Block a user