nuxt-modules / supabase

Supabase module for Nuxt.
https://supabase.nuxtjs.org
MIT License
733 stars 129 forks source link

Configuring exclude in Nuxt 3 with Asynchronous Functions #323

Open NereaFontecha opened 10 months ago

NereaFontecha commented 10 months ago

Hi , I'm interested in understanding whether it's feasible to generate an array of slugs dynamically, fetching them asynchronously within a function. In this case the function name is useExcludedURLS(). Thanks

nuxt.config.js supabase: { url: process.env.SUPABASE_URL, key: process.env.SUPABASE_ANON_KEY, redirectOptions: { login: '/auth/sign-up', callback: '/confirm', **exclude: useExcludedURLS()** }, },

// Function const useExcludedURLS = async ()=> { return await new Promise((resolve, reject) => { resolve( ['/', '/about']); }); }