mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 19:01:47 +00:00
fix(auth): corrigir verify e unificar tokens com prefixo opm_
- Corrige /api/auth/device/verify que rejeitava tokens criados via Settings (revertido de JWT para hash lookup) - Renomeia prefixo de tokens de os_ para opm_ (OpenMonetis) - Remove rotas JWT não utilizadas (token, refresh) - Simplifica api-token.ts mantendo apenas hashToken e extractBearerToken BREAKING CHANGE: tokens existentes com prefixo os_ param de funcionar. Revogar e recriar tokens após o deploy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -610,7 +610,7 @@ const revokeApiTokenSchema = z.object({
|
||||
});
|
||||
|
||||
function generateSecureToken(): string {
|
||||
const prefix = "os";
|
||||
const prefix = "opm";
|
||||
const randomPart = randomBytes(32).toString("base64url");
|
||||
return `${prefix}_${randomPart}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user