const supabaseClient = createClient( Deno.env.get('SUPABASE_URL'), Deno.env.get('SUPABASE_ANON_KEY'), { global: { headers: { Authorization: req.headers.get('Authorization') } } })const { data: { user }, error } = await supabaseClient.auth.getUser()// Still returns 401 before reaching this code
const supabaseClient = createClient( Deno.env.get('SUPABASE_URL'), Deno.env.get('SUPABASE_ANON_KEY'), { global: { headers: { Authorization: req.headers.get('Authorization') } } })const { data: { user }, error } = await supabaseClient.auth.getUser()// Still returns 401 before reaching this code
2. Setting
verify_jwt = false
verify_jwt = false
in
config.toml
config.toml
:
[functions.create-user-profile]verify_jwt = false
[functions.create-user-profile]verify_jwt = false
3. Tried both
serve
serve
from std library and
Deno.serve
Deno.serve
4. Deployed via both CLI and Dashboard
Question: Is there a known issue with ES256 token verification in Edge Functions? Should I switch back to HS256 signing, or is there a configuration I'm missing?
The same tokens work fine with Supabase Auth API endpoints.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.