Spaces:
Sleeping

Muhasebe / frontend /src /auth /token.js
Caner7's picture
Add FastAPI backend, React frontend, Docker and project docs
57a9d02
Raw History Blame Contribute Delete
360 Bytes
/** localStorage anahtarı: backend ile uyumlu bearer token saklama. */
export const TOKEN_KEY = "muhasebe_auth_token";
export function getAuthToken() {
return localStorage.getItem(TOKEN_KEY) || "";
}
export function setAuthToken(token) {
if (!token) {
localStorage.removeItem(TOKEN_KEY);
return;
}
localStorage.setItem(TOKEN_KEY, token);
}