nNexGateHub
Browse NexGateHub
GPT

Route Protection Implementation

// src/pages/dashboard.astro import { betterAuth } from '../lib/auth' import type { User } from '../types' if (!Astro.locals.user) { return Astro.redirect('/login') } const user = Astro.locals.user as User Dashboard

Prompt text

Original English text. Replace placeholders with your own details.

Source & attribution

Instructa AI Prompts · Instructa AI Prompts

Source-listed license: CC-BY-4.0. Prompt text is preserved; titles and previews may be shortened for display. Source examples are not NexGateHub test results.

View original source ↗ · Source credits & licenses

Explore more prompts →