Files
supabase/studio/components/layouts/AuthLayout/AuthLayout.utils.ts
T
Joshen Lim 8be40f1fdb Chore/separate auth rate limits into its own page (#18265)
* Create new auth rate limits page

* Hook up RQ

* Remove rate limit fields from phone provider and SMTP settings

* Update default value and descriptions for token and verification rate limits

* Add ID to each form limit rate section

* Improve rate limit descriptions

* Hide token refresh and verify rate limits
2023-10-18 19:26:41 +08:00

53 lines
1.4 KiB
TypeScript

import { IS_PLATFORM } from 'lib/constants'
import { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
export const generateAuthMenu = (ref: string): ProductMenuGroup[] => {
return [
{
title: 'Manage',
items: [{ name: 'Users', key: 'users', url: `/project/${ref}/auth/users`, items: [] }],
},
{
title: 'Configuration',
items: [
{
name: 'Policies',
key: 'policies',
url: `/project/${ref}/auth/policies`,
items: [],
},
...(IS_PLATFORM
? [
{
name: 'Providers',
key: 'providers',
url: `/project/${ref}/auth/providers`,
items: [],
},
{
name: 'Rate Limits',
key: 'rate-limits',
url: `/project/${ref}/auth/rate-limits`,
items: [],
},
{
name: 'Email Templates',
key: 'templates',
url: `/project/${ref}/auth/templates`,
items: [],
},
{
name: 'URL Configuration',
key: 'url-configuration',
url: `/project/${ref}/auth/url-configuration`,
items: [],
},
]
: []),
],
},
]
}