ENG-8753 docs: add enterprise auth documentation section#6672
ENG-8753 docs: add enterprise auth documentation section#6672FarhanAliRaza wants to merge 3 commits into
Conversation
Add docs for the OIDC AuthPlugin covering the secure-by-default model, providers, custom auth pages, and testing guarded code. Register the new pages in the enterprise sidebar, add an Authentication category to the enterprise overview, and whitelist the section for preview.
Merging this PR will not alter performance
Comparing Footnotes
|
Greptile SummaryThis PR adds a new enterprise authentication documentation section covering the
Confidence Score: 5/5The changes are purely additive documentation and sidebar/overview wiring; no runtime logic is altered. All changed files are Markdown docs, a Python sidebar config, and the whitelist helper. None of the new content touches executable application code. The one new finding is a style issue in pseudo-code signature blocks. docs/app/reflex_docs/whitelist.py — the non-empty WHITELISTED_PAGES list will suppress all pages outside the two listed prefixes in any build environment that imports this module, which has been raised as a concern in a prior review thread. Important Files Changed
Reviews (2): Last reviewed commit: "docs(auth): clarify User Vars bind to Au..." | Re-trigger Greptile |
| WHITELISTED_PAGES = [ | ||
| # "/getting-started/introduction", | ||
| # Auth docs preview — matches all 5 pages under /enterprise/auth/ by prefix, | ||
| # plus the enterprise overview landing page so navigation into the section works. | ||
| "/enterprise/auth", | ||
| "/enterprise/overview", | ||
| ] |
There was a problem hiding this comment.
Non-empty whitelist breaks all non-auth docs pages
_check_whitelisted_path is called unconditionally during page registration in __init__.py. When WHITELISTED_PAGES is non-empty, every page whose route does not start with one of the listed prefixes returns False from resolve_doc_route and is skipped entirely. Merging this change means any build environment that imports reflex_docs.pages.docs — including the production build — would compile only the six auth/enterprise-overview pages and silently drop the entire rest of the documentation site. The original file intentionally used an empty list to build everything.
Document that User.name/.email/.sub/.picture resolve against AuthUserState — populated after login by whichever provider authenticated the user — so they work in single- and multi-provider setups alike, rather than the first configured provider. Correct their type from `str | None` to `str` (empty until login) and note AuthUserState.provider_name / User.current_provider() for branching on the active provider.
Add docs for the OIDC AuthPlugin covering the secure-by-default model, providers, custom auth pages, and testing guarded code. Register the new pages in the enterprise sidebar, add an Authentication category to the enterprise overview, and whitelist the section for preview.
All Submissions:
Type of change
Please delete options that are not relevant.
New Feature Submission:
Changes To Core Features: