NuxtN
Nuxt13mo ago
ants

Supabase auth redirect rules

I have a Nuxt app with an API route defined at
/server/api/scan/[club].ts
, but accessing it will redirect the user to the
/login
route. This is my Nuxt config

supabase: {
  redirectOptions: {
    login: '/login',
    callback: '/auth/callback',
    exclude: ['/', '/login', '/auth/callback', '/api/scan'],
  },
},


how could I exclude the dynamic server route from the redirect middleware? Also
/api/scan/*
and that also doesn't work, while turning off the redirects fixes it obviously
supabase: {
  redirect: false,
},
Was this page helpful?