Plugins
How the console auto-detects and adapts to better-auth plugins.
The console automatically detects which better-auth plugins you have installed and adapts the UI accordingly.
Plugin Detection
When you configure a better-auth instance with plugins, the console reads the plugin configuration and enables relevant features:
import { organization, admin, apiKey } from "better-auth/plugins";
const auth = betterAuth({
secret: "console-only",
database: drizzleAdapter(db, { provider: "pg", schema }),
plugins: [
organization({ teams: { enabled: true } }),
admin(),
apiKey(),
],
});Supported Plugins
| Plugin | Features Enabled |
|---|---|
organization | Organisations, Invitations sidebar items |
organization with teams: { enabled: true } | Teams sidebar item |
admin | Ban/unban user actions, role column |
apiKey | API Keys sidebar item |
Organization Plugin
When the organization plugin is detected:
- Organisations page appears in the sidebar
- Invitations page for managing pending invites
- Organizations tab shows in user profiles
- Organization membership data in user details
Teams Support
If teams are enabled (teams: { enabled: true }):
- Teams page appears in the sidebar
- Team assignments shown in organisation views
- Team column in member lists
organization({ teams: { enabled: true } })See Organisations, Teams, and Invitations for details.
Admin Plugin
When the admin plugin is detected:
- Role column shows in users table
- Ban/Unban actions available for users
- Banned status column visible
- Admin role assignment in user edit
admin()See Users for details.
API Key Plugin
When the apiKey plugin is detected:
- API Keys page appears in the sidebar
- Enable/disable key actions
- Usage statistics display
- Key management in user profiles
apiKey()See API Keys for details.
Multiple Instances
Each instance can have different plugins. The UI adapts per-instance:
export default [
{
id: "production",
name: "Production",
env: "production",
auth: betterAuth({
// All plugins
plugins: [organization(), admin(), apiKey()],
}),
},
{
id: "development",
name: "Development",
env: "development",
auth: betterAuth({
// Only organization
plugins: [organization()],
}),
},
];When switching instances, the sidebar and available features update automatically.
No Plugins
If no plugins are configured, the console shows core features only:
- Dashboard
- Users
- Sessions
- Accounts
Add plugins to your instance configuration to enable additional console features.
Next Steps
- Configuration - Configure plugins in your instance
- Instances - Different plugins per instance
- Organisations - Organization plugin features
- API Keys - API Key plugin features