Admin Dashboard Overview
The Admin Dashboard is a Next.js web application that provides a user-friendly interface for managing S-Auth users and OAuth applications.
Features
- User Management - Create, edit, suspend, and delete user accounts
- Password Reset - Generate temporary passwords for users
- Application Management - Register and configure OAuth clients
- Secure Access - Protected by S-Auth OAuth login (admin only)
Access
The Admin Dashboard is available at:
- Production: https://admin.sebbyk.net
- Local Development: http://localhost:3000
Authentication
The Admin Dashboard uses S-Auth for authentication:
- Click "Login" to be redirected to S-Auth
- Enter your admin credentials
- Grant consent (first time only)
- You're logged in!
Note: Only users with access_level: "admin" can access the dashboard.
Navigation
┌─────────────────────────────────────────────────────────┐
│ S-Auth Admin [User Menu ▼] │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ Users │ │ Applications │ │
│ │ │ │ │ │
│ │ Manage │ │ Register │ │
│ │ accounts │ │ OAuth │ │
│ │ │ │ clients │ │
│ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────┘
Quick Actions
Users
- View all users with search and filtering
- Create new user accounts
- Edit user details (name, email, access level)
- Suspend/activate accounts
- Reset passwords
Applications
- View all registered OAuth clients
- Create new applications
- Configure redirect URIs and allowed scopes
- Regenerate client secrets
- Set application visibility (public/private)
Technical Details
The Admin Dashboard is built with:
- Next.js 14 with App Router
- NextAuth.js for OAuth authentication
- Tailwind CSS for styling
- React Hook Form for form handling
- Zod for validation
Configuration
Environment variables required:
# OAuth Provider connection
NEXT_PUBLIC_OAUTH_PROVIDER_URL=https://auth.sebbyk.net
OAUTH_CLIENT_ID=admin_dashboard
OAUTH_CLIENT_SECRET=your-client-secret
OAUTH_REDIRECT_URI=https://admin.sebbyk.net/callback
# NextAuth configuration
NEXTAUTH_SECRET=your-nextauth-secret
NEXTAUTH_URL=https://admin.sebbyk.net
Security
- Only admin users can access
- Session managed via NextAuth.js
- API calls authenticated with access tokens
- HTTPS enforced in production