feat: capture and log browser information during user login
- Integrated browser information capture in the login process, including user agent and IP address. - Enhanced device and browser detection logic to provide more detailed insights into user environments. - Improved system detection for various operating systems and devices, ensuring accurate reporting during authentication.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
import NotificationBell from "$lib/components/chat/NotificationBell.svelte";
|
||||
import ChatWidget from "$lib/components/chat/ChatWidget.svelte";
|
||||
import PresenceManager from "$lib/components/chat/PresenceManager.svelte";
|
||||
import { getBrowserInfo } from "$lib/utils/browserInfo";
|
||||
|
||||
let { children }: { children: Snippet } = $props();
|
||||
|
||||
@@ -100,9 +101,14 @@
|
||||
carregandoLogin = true;
|
||||
|
||||
try {
|
||||
// Capturar informações do navegador
|
||||
const browserInfo = await getBrowserInfo();
|
||||
|
||||
const resultado = await convex.mutation(api.autenticacao.login, {
|
||||
matriculaOuEmail: matricula.trim(),
|
||||
senha: senha,
|
||||
userAgent: browserInfo.userAgent || undefined,
|
||||
ipAddress: browserInfo.ipAddress,
|
||||
});
|
||||
|
||||
if (resultado.sucesso) {
|
||||
|
||||
Reference in New Issue
Block a user