[EDIFIKANA] #425 Password reset backend (Phase 0)#458
Merged
gaaliciA1990 merged 3 commits intomainfrom Mar 27, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the first backend slice of password reset by introducing a public password-reset-request endpoint backed by Supabase Auth, and wiring the front-end service to call it while preventing email enumeration via always-200 behavior.
Changes:
- Added
POST /user/request-password-resetAPI operation + shared request model (PasswordResetNetworkRequest) - Implemented backend flow (
UserController→UserService→UserDatastore/Supabase) that suppresses failures and returns success - Added unit tests for
UserService.requestPasswordResetand integration tests forSupabaseUserDatastore.requestPasswordReset
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| edifikana/shared/src/commonMain/kotlin/com/cramsan/edifikana/lib/model/network/PasswordResetNetworkRequest.kt | Adds shared network request body for password reset requests |
| edifikana/front-end/shared-app/src/commonMain/kotlin/com/cramsan/edifikana/client/lib/service/impl/AuthServiceImpl.kt | Implements passwordReset() by calling the new backend endpoint |
| edifikana/back-end/src/test/kotlin/com/cramsan/edifikana/server/service/UserServiceTest.kt | Adds unit tests validating “always success” behavior to prevent enumeration |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/service/UserService.kt | Adds service method that suppresses datastore failures and always returns success |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/UserDatastore.kt | Extends datastore interface with requestPasswordReset |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseUserDatastore.kt | Implements password reset via auth.resetPasswordForEmail |
| edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/UserController.kt | Registers unauthenticated handler for password reset requests |
| edifikana/back-end/src/integTest/kotlin/com/cramsan/edifikana/server/datastore/supabase/SupabaseUserDatastoreIntegrationTest.kt | Adds integration tests for reset request success paths |
| edifikana/api/src/commonMain/kotlin/com/cramsan/edifikana/api/UserApi.kt | Adds API operation definition for requestPasswordReset |
...d-app/src/commonMain/kotlin/com/cramsan/edifikana/client/lib/service/impl/AuthServiceImpl.kt
Show resolved
Hide resolved
edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/datastore/UserDatastore.kt
Outdated
Show resolved
Hide resolved
edifikana/back-end/src/main/kotlin/com/cramsan/edifikana/server/controller/UserController.kt
Show resolved
Hide resolved
9005ad0 to
070cbee
Compare
CRamsan
approved these changes
Mar 27, 2026
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
POST /user/request-password-resetpublic endpoint (no auth required)supabase.auth.resetPasswordForEmail(email)and always returns HTTP 200 to prevent email enumerationAuthServiceImpl.passwordReset()to call the new endpointCloses #425
🤖 Generated with Claude Code