Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Підготовка контенту платформи Ring
Ring Platform uses next-intl with localePrefix: 'as-needed' and a slim proxy that handles locale rewriting — not full authorization.
| Layer | Responsibility |
|---|---|
proxy.ts | Locale rewrite, optimistic cookie redirect to /login, self-redirect guard |
(authenticated)/[locale]/layout.tsx | await auth() — redirect if unauthenticated |
(admin)/[locale]/layout.tsx | await auth() + role check |
(confidential)/[locale]/layout.tsx | await auth() + confidential tier |
| API routes | Per-route auth() or session checks |
Auth.js callbacks.authorized in auth.config.ts is not the primary enforcement layer for locale-prefixed routes.
Shared helpers extracted for flagship rings:
Ring Platform uses next-intl with localePrefix: 'as-needed' and a slim proxy that handles locale rewriting — not full authorization.
| Layer | Responsibility |
|---|---|
proxy.ts | Locale rewrite, optimistic cookie redirect to /login, self-redirect guard |
(authenticated)/[locale]/layout.tsx | await auth() — redirect if unauthenticated |
(admin)/[locale]/layout.tsx | await auth() + role check |
(confidential)/[locale]/layout.tsx | await auth() + confidential tier |
| API routes | Per-route auth() or session checks |
Auth.js callbacks.authorized in auth.config.ts is not the primary enforcement layer for locale-prefixed routes.
Shared helpers extracted for flagship rings:
Ring Platform uses next-intl with localePrefix: 'as-needed' and a slim proxy that handles locale rewriting — not full authorization.
| Layer | Responsibility |
|---|---|
proxy.ts | Locale rewrite, optimistic cookie redirect to /login, self-redirect guard |
(authenticated)/[locale]/layout.tsx | await auth() — redirect if unauthenticated |
(admin)/[locale]/layout.tsx | await auth() + role check |
(confidential)/[locale]/layout.tsx | await auth() + confidential tier |
| API routes | Per-route auth() or session checks |
Auth.js callbacks.authorized in auth.config.ts is not the primary enforcement layer for locale-prefixed routes.
Shared helpers extracted for flagship rings:
routing.localesx-pathname)/api/auth/* is excluded from intl middleware. Google One Tap and standard OAuth flows are unaffected by proxy slimming.
routing.localesx-pathname)/api/auth/* is excluded from intl middleware. Google One Tap and standard OAuth flows are unaffected by proxy slimming.
routing.localesx-pathname)/api/auth/* is excluded from intl middleware. Google One Tap and standard OAuth flows are unaffected by proxy slimming.