Skip to main content
Feather uses Google OAuth — no passwords to store, no signup forms to build. The same flow handles login and registration: users click “Sign in with Google”, authorize the app, and Feather creates their account if it does not exist. This eliminates the entire signup, login and forgot-password complexity that traditional auth requires.
Google OAuth is the default, but the architecture extends to other OAuth providers (GitHub, Microsoft) by adding additional blueprints.

Setup

1

Create OAuth credentials

Create them at the Google Cloud Console.
2

Add the redirect URI

http://localhost:5173/auth/google/callback for development, or your production URL.
3

Add credentials to .env

.env
4

Create your admin user

Routes

GET /auth/logout is deprecated. POST to it instead.

Approval workflows

When users first authenticate, Feather can either auto-approve them or hold them for admin review. Manual approval creates new users in a suspended state. They see a pending-approval page until an admin approves them in the admin panel. This prevents drive-by signups and gives you explicit control over who uses the application. Auto-approve activates new users on first login. Selecting it during scaffolding sets AUTO_APPROVE_USERS = True in your config.py and the framework handles the rest — no callback files or environment variables needed.
To convert an existing app from manual to auto-approve, add AUTO_APPROVE_USERS = True to config.py.

Status pages

These pages are scaffolded with friendly messages and logout buttons. They use @login_only so users stay authenticated while seeing their account status. Edit the templates in templates/pages/account/ to match your branding.

Decorators

Which one to use

Roles

These defaults cover most apps, but you can add, remove or rename them. Roles inherit permissions, so @role_required('editor') allows both editors and admins. To customize, edit the hierarchy in feather/auth/roles.py:
Then use it with @role_required('reviewer'). The User model’s role field is a simple string, so no migration is needed when adding roles.

Permissions

CRUD-based access control that maps onto roles.
Permissions are defined in feather/auth/permissions.py and extend the same way roles do.

Seeds

seeds.py populates initial data. The scaffolded version creates your admin user with the email you provided during feather new. Extend it for your own data:
seeds.py
Run it anytime with python seeds.py or feather db seed. The scaffolded seed is idempotent — it updates existing users rather than creating duplicates.

Callbacks

For B2B and B2C apps that need custom account setup after OAuth.
.env
myapp/auth.py
Use this for creating Account or Membership records, assigning tenants to public email users, or custom onboarding flows.
Block new registrations before the account is created. Runs during OAuth signup only for new users — existing users logging in are unaffected.
.env
myapp/auth.py
Returning a string blocks registration — the message is shown as a toast error and no user record is created. Returning None (or raising) lets registration proceed. Errors in the callback are logged but do not block signups.