mirror of
https://github.com/felipegcoutinho/openmonetis.git
synced 2026-05-09 11:01:45 +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:
@@ -41,8 +41,8 @@ export async function POST(request: Request) {
|
||||
);
|
||||
}
|
||||
|
||||
// Validar token os_xxx via hash
|
||||
if (!token.startsWith("os_")) {
|
||||
// Validar token opm_xxx via hash
|
||||
if (!token.startsWith("opm_")) {
|
||||
return NextResponse.json(
|
||||
{ error: "Formato de token inválido" },
|
||||
{ status: 401 },
|
||||
|
||||
Reference in New Issue
Block a user