© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
S
Supabase
•
2w ago
•
2 replies
Red red
invalid jwt
auth
i
'm getting invalid Jwt eerror on supa
my edge function code is like
/
/ Recupera o JWT do cabe
çalho de autoriza
ç
ão
const authHeader
= req
.headers
.get
(
"Authorization
"
)
"
"
;
const jwt
= authHeader
.replace
(
"Bearer
"
,
"
"
)
;
logWithTrace
(traceId
,
"JWT recebido
"
,
{ hasJwt
:
!
!jwt
}
)
;
/
/ Verifica se o JWT
é v
álido e obt
ém o usu
ário correspondente
const
{ data
: authData
, error
: authError
}
= await supabase
.auth
.getUser
(jwt
)
;
if
(authError
!authData
?
.user
)
{
logErrorWithTrace
(traceId
,
"Erro de autentica
ç
ão
"
, authError
)
;
return createResponse
(
{ success
: false
, error
:
"N
ão autorizado
"
}
,
401
)
;
}
i
'm getting only invalid jwt
.
Supabase
Join
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
Invalid Jwt
S
Supabase / help-and-questions
6d ago
Invalid JWT
S
Supabase / help-and-questions
2mo ago
Invalid JWT
S
Supabase / help-and-questions
4y ago
Edge function giving Invalid JWT
S
Supabase / help-and-questions
7mo ago