Skip to content

allowed oauth emails, live reload of oauth user setting vars - #55

Merged
heapoftrash merged 11 commits into
mainfrom
feat/allowed-oauth-emails
Mar 26, 2026
Merged

heapoftrash merged 11 commits into
mainfrom
feat/allowed-oauth-emails

Conversation

@heapoftrash

Copy link
Copy Markdown
Owner

Oauth changes

Config changes

  • oauth_admin_emails: Admin user emails from OAuth
  • oauth_allowed_emails: Allowed user from OAuth to login
  • oauth_allow_all_users: Allow all users from Oauth

ENV Vars

  • OAUTH_ADMIN_EMAILS
  • OAUTH_ALLOWED_EMAILS
  • OAUTH_ALLOW_ALL_USERS

Feature added

  • Live reload of these parameters only
  • Update API, Settings UI, examples, and docs; add CHANGELOG for v0.0.3-beta

No backward compatibility, as we are still in beta

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Backend: go build ./... && go vet ./... && go test ./... passes
  • Frontend: npm run build passes
  • Commit messages follow Conventional Commits

Only emails in admin_emails ∪ allowed_oauth_emails may complete OAuth sign-in.
Admin UI access remains admin_emails and local is_admin only. Empty union
when OAuth is enabled denies OAuth login; startup log and Settings warning.
Login page shows oauth_no_allowlist and oauth_not_allowed errors.

Env: ALLOWED_OAUTH_EMAILS. AuthHandler reads live config for allowlist and /me.

Closes #43
OAuth denials after userinfo use the same provider/email/name fields as
successful logins, with a reason suffix. Local failures log username with
invalid_credentials or unknown_user.
When true, any OAuth user with a non-empty email may sign in; admin_emails
still gates admin only. Env OAUTH_ALLOW_ALL_USERS. Startup logs when enabled;
empty-list warning suggests this flag. Settings toggle and docs updated.
- users: oauth_admin_emails, oauth_allowed_emails, oauth_allow_all_users
- env: OAUTH_ADMIN_EMAILS, OAUTH_ALLOWED_EMAILS, OAUTH_ALLOW_ALL_USERS
- Update API, Settings UI, examples, and docs; add CHANGELOG for v0.0.3-beta
- Shorter registry help text and clearer field labels
- Section headings: OAuth sign-in vs default admin bootstrap
- Warning when allow-all is on; confirm modal before enabling
- Placeholders: admin@ vs user@ for the two email lists
- OAuth sub-tab is OAuth-only; Local sub-tab has local auth, local users,
  divider, then default admin bootstrap
- Rename sidebar labels to OAuth / Local; fix categoryForField for bootstrap fields
- Form layout horizontal with responsive labelCol/wrapperCol
- colon=false, labelAlign=left on form
- OAuth/local string[] and local_users list items use Form label column;
  Add actions only on the right
- Local user card fields use layout=vertical to avoid cramped columns
@github-actions github-actions Bot added documentation Improvements or additions to documentation frontend Related to frontend backend Related to backend labels Mar 26, 2026
@heapoftrash heapoftrash added this to the first stable release milestone Mar 26, 2026
@heapoftrash
heapoftrash merged commit afaf61d into main Mar 26, 2026
10 of 11 checks passed
@heapoftrash
heapoftrash deleted the feat/allowed-oauth-emails branch March 26, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Related to backend documentation Improvements or additions to documentation frontend Related to frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant