🐛 OAuth2 sign-in flow, profile auto-creation, and E2E tests#10
Merged
Conversation
OAuth2 endpoints previously returned redirect URLs as JSON 200 responses. Hydra standard OAuth2 flow expects browser redirects via HTTP 302 with Location headers.
Pass email from Kratos identity traits through login context to consent handler. Only include email claim in id_token when "email" scope is granted, preventing unintended PII disclosure.
…mmediate query failure
Account creation now automatically creates a Profile with display_name
set to the account name, eliminating the need for a separate
POST /accounts/{account_id}/profile endpoint.
- Add ProfileCommandProcessor dependency to CreateAccountUseCase
- Add synchronous ReadModel write to ProfileCommandProcessor::create
- Remove POST profile endpoint, CreateProfileUseCase, and related DTOs
- Regenerate openapi.json, update CLAUDE.md
Replace hardcoded relation-based permission checks with OPL permits. Namespace names updated to match OPL class names (Account, Instance). Permission hierarchy (owners->view/edit/sign/deactivate, etc.) is now defined in namespaces.ts and resolved by Keto, simplifying Rust code to single-request permission checks.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10 +/- ##
==========================================
+ Coverage 63.73% 66.08% +2.34%
==========================================
Files 98 99 +1
Lines 9655 9775 +120
==========================================
+ Hits 6154 6460 +306
+ Misses 3501 3315 -186 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cargo binstall downloads prebuilt binaries and does not accept --no-default-features/--features flags.
- Add cargo build -p server step before running E2E tests so that cargo run inside the test starts the prebuilt binary immediately. - Extend wait_until_ready timeout from 30s to 60s as a safety margin.
- Split justfile into composable recipes (up, wait-services, migrate, e2e-test, e2e) - Workflow now invokes 'just e2e' and 'just down' instead of inlining bash - Keeps local and CI E2E flows consistent
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.
Summary
server/tests/e2e_basic_flow.rs)Changes
Bug Fixes
:bug:HTTP 302 を OAuth2 login/consent エンドポイントから正しく返すように修正:bug:OffsetDateTime を ISO 8601 (RFC3339) フォーマットにシリアライズするよう修正:bug:CommandProcessor で Account ReadModel 作成を同期化し、find_or_createパターンの競合を防止:bug:Keto v0.12 の HTTP 403 レスポンス処理を修正Features
:sparkles:Account 作成時に Profile を自動生成:sparkles:Hydra id_token に email クレームを含めるRefactoring
:recycle:Keto 権限モデルを OPL に移行:recycle:パスパラメータ名を OpenAPI 一貫性のために統一:recycle:ルートスモークテストを OpenAPI スペック駆動に変更:arrow_up:axum 0.8, tower-http 0.6 へアップグレードTesting
:white_check_mark:E2E テスト追加: OAuth2 login → Account 作成 → Profile 非同期プロジェクション検証justfileにjust e2e/just e2e-downコマンド追加Running E2E Tests