feat: experimental option to run tinyauth in oauth bridge mode#1027
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an experimental OAuth bridge configuration flag, startup warning, and conditional identity mapping for OAuth sessions and Tailscale contexts. ChangesOAuth bridge identity flow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant OAuthProvider
participant oauthCallbackHandler
participant createOAuthUserInfo
participant Session
OAuthProvider->>oauthCallbackHandler: OAuth user fields
oauthCallbackHandler->>createOAuthUserInfo: Normalize identity
createOAuthUserInfo-->>oauthCallbackHandler: oauthUserInfo
oauthCallbackHandler->>Session: Create session identity
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@internal/controller/oauth_controller.go`:
- Around line 367-374: In the OAuth name assignment block, reverse the condition
so a non-empty input.Name is preserved in info.Name, while only missing names
use the email-derived fallback. Before accessing the split email parts in this
fallback, validate that input.Email contains an @ and handle malformed addresses
without indexing a missing second element.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: cd429326-6147-40ad-b760-73c25e487525
📒 Files selected for processing (5)
.env.examplecmd/tinyauth/tinyauth.gointernal/controller/oauth_controller.gointernal/middleware/context_middleware.gointernal/model/config.go
Summary by CodeRabbit