user-access
CommunityUse authenticated user data on client and server.
Authorgileck
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Accessing the current authenticated user in both client UI code and server API handlers is essential for personalizing experiences and enforcing user-based access control.
Core Features & Use Cases
- Client-side: Retrieve the user via useAuth() and access user.id for UI decisions.
- Server-side: Read context.userId from ApiHandlerContext to authorize requests and fetch user-specific data.
- Use Case: Display personalized greetings and enforce route/data restrictions based on user identity.
Quick Start
- On the client, import { useAuth } from 'path/to/AuthContext' and read the user object.
- In API handlers, access const userId = context.userId and guard routes when userId is undefined.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: user-access Download link: https://github.com/gileck/app-template-ai/archive/main.zip#user-access Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.