Skip to content

feat(authentication): add organization parameter to resetPassword - #1038

Merged
NandanPrabhu merged 3 commits into
mainfrom
feat/reset-password-organization
Aug 6, 2026
Merged

NandanPrabhu merged 3 commits into
mainfrom
feat/reset-password-organization

Conversation

@NandanPrabhu

@NandanPrabhu NandanPrabhu commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds an optional organization parameter to AuthenticationAPIClient.resetPassword, sent as the organization key in the dbconnections/change_password request body.

When set, Auth0 associates the password reset request with that organization, which makes organization_id and organization_name available in the reset redirect URL and as variables in customized email templates.

authentication
    .resetPassword("info@auth0.com", "my-database-connection", "org_abc123")
    .start(callback)

Additive only. The parameter defaults to null; when absent the request body is byte-identical to today's. No existing behaviour changes.

Test plan

  • ./gradlew testReleaseUnitTest jacocoTestReleaseUnitTestReport lintRelease --continue — BUILD SUCCESSFUL
  • 1444 tests, 0 failures, 0 skipped
  • Lint: 0 errors (24 warnings, all pre-existing and outside the changed lines)
  • auth0:compileReleaseKotlin passes explicit API mode (strict)
  • All 6 pre-existing resetPassword tests pass unmodified — confirms backward compatibility
  • @JvmOverloads 2-arg bridge confirmed present via javap

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e2a5abb3-6dc1-461c-9818-42471a932741

📥 Commits

Reviewing files that changed from the base of the PR and between 1eaa4f3 and efa2682.

📒 Files selected for processing (3)
  • EXAMPLES.md
  • auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt
  • auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.kt
🚧 Files skipped from review as they are similar to previous changes (3)
  • auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt
  • EXAMPLES.md
  • auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.kt

📝 Walkthrough

Walkthrough

resetPassword now accepts an optional organization ID and includes it in the password reset request when provided. Tests cover callback, synchronous, coroutine, null, omitted, and empty-string values. Documentation adds Kotlin, coroutine, and Java examples.

Changes

Password reset organization support

Layer / File(s) Summary
API request support
auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt
resetPassword accepts an optional organization parameter and conditionally adds it to the request.
Validation and documentation
auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.kt, EXAMPLES.md
Tests cover organization handling across execution modes and input values. Documentation describes the new parameter, examples, and organization ID requirement.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: documentation

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant AuthenticationAPIClient
  participant PasswordResetEndpoint
  Client->>AuthenticationAPIClient: resetPassword(email, connection, organization)
  AuthenticationAPIClient->>PasswordResetEndpoint: Send reset parameters including organization when provided
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding an organization parameter to AuthenticationAPIClient.resetPassword.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/reset-password-organization

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NandanPrabhu
NandanPrabhu marked this pull request as ready for review August 5, 2026 14:19
@NandanPrabhu
NandanPrabhu requested a review from a team as a code owner August 5, 2026 14:19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 `@EXAMPLES.md`:
- Around line 1820-1827: Update the Kotlin example around the
AuthenticationException catch block to use the valid Throwable method name on e;
replace the current printStacktrace call with the standard printStackTrace
invocation so the snippet compiles when copied. Keep the rest of the
resetPassword example unchanged.
🪄 Autofix

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 06be18f4-3506-46e7-9570-6137fe5ff6d0

📥 Commits

Reviewing files that changed from the base of the PR and between f603638 and d645f0b.

📒 Files selected for processing (3)
  • EXAMPLES.md
  • auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.kt
  • auth0/src/test/java/com/auth0/android/authentication/AuthenticationAPIClientTest.kt

Comment thread EXAMPLES.md Resolved
@NandanPrabhu
NandanPrabhu force-pushed the feat/reset-password-organization branch from d645f0b to efa2682 Compare August 6, 2026 06:01
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@NandanPrabhu
NandanPrabhu merged commit e9337ef into main Aug 6, 2026
7 checks passed
@NandanPrabhu
NandanPrabhu deleted the feat/reset-password-organization branch August 6, 2026 06:09
@pmathew92 pmathew92 mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants