supabase
supabase copied to clipboard
Option i18n for redirection
Good afternoon everyone! I am using a multilingual module (@nuxtjs/i18n and I use prefix_and_default strategy) and I have encountered the problem of multiple routes repeating in the config for each language
Here is an example of nuxt.config.ts configuration for supabase
supabase: {
url: process.env.SUPABASE_URL,
key: process.env.SUPABASE_KEY,
redirect: true,
redirectOptions: {
login: 'login',
callback: 'confirm',
include: ['/bg/app(/.*)?', '/fr/app(/.*)?', '/app(/.*)?'],
exclude: ['/login'],
cookieRedirect: true
},
}
Here is an example of nuxt.config.ts configuration i18n
i18n: {
vueI18n: './i18n.config.ts',
types: 'composition',
strategy: 'prefix_and_default',
defaultLocale: 'en',
lazy: true,
langDir: 'locales',
locales: [
{
code: 'en',
iso: 'en-US',
name: 'English',
nameEn: 'English',
file: 'en-US.ts'
},
{
code: 'bg',
iso: 'bg-BG',
name: 'Български',
nameEn: 'Bulgarian',
file: 'bg-BG.ts'
},
{
code: 'ru',
iso: 'ru-RU',
name: 'Русский',
nameEn: 'Russian',
file: 'ru-RU.ts'
},
{
code: 'fr',
iso: 'fr-FR',
name: 'Français',
nameEn: 'French',
file: 'fr-FR.ts'
}
],
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'i18n_redirected',
redirectOn: 'root'
}
}
Is it possible to add an option in the supabase setup that would avoid this problem?
Thank you!
Got the exact same issue.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
mark