allowed oauth emails, live reload of oauth user setting vars - #55
Merged
Merged
Conversation
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
…ture of full config reload
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Oauth changes
Config changes
ENV Vars
Feature added
Type of change
Checklist
go build ./... && go vet ./... && go test ./...passesnpm run buildpasses