Skip to content

fix(core): version authenticator routes to v1 - #3398

Merged
eduardoformiga merged 1 commit into
devfrom
fix/authenticator-api-v1-versioning
Jun 25, 2026
Merged

eduardoformiga merged 1 commit into
devfrom
fix/authenticator-api-v1-versioning

Conversation

@eduardoformiga

@eduardoformiga eduardoformiga commented Jun 18, 2026 •

Copy link
Copy Markdown
Member

Summary

The Authenticator API now uses versioned routes. The unversioned paths will be deprecated soon, so this PR adds the v1 segment after authenticator/ for the routes used by useSetPassword:

  • /api/authenticator/pub/authentication/classic/setpassword → /api/authenticator/v1/pub/authentication/classic/setpassword
  • /api/authenticator/pub/authentication/start → /api/authenticator/v1/pub/authentication/start

Test plan

  • pnpm vitest run test/sdk/account/useSetPassword.test.ts passes
  • Validate set-password flow against a store using the versioned routes

Made with Cursor

Summary by CodeRabbit

  • Chores
    • Updated internal API path references for password setting functionality to use the latest authenticator service version. No changes to user-facing behavior or request/response structures.

Updates the Authenticator API routes used by useSetPassword to the new
versioned path (/api/authenticator/v1/...). The unversioned routes will
be deprecated soon, so the v1 prefix is added after authenticator/ for
both the setpassword and authentication start calls.
@eduardoformiga
eduardoformiga requested a review from a team as a code owner June 18, 2026 15:57
@eduardoformiga
eduardoformiga requested review from gabpaladino and renatomaurovtex and removed request for a team June 18, 2026 15:57
@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5f553fef-da22-4173-9094-6b1c48a81d61

📥 Commits

Reviewing files that changed from the base of the PR and between cc04401 and 7091ad8.

📒 Files selected for processing (2)
  • packages/core/src/sdk/account/useSetPassword.ts
  • packages/core/test/sdk/account/useSetPassword.test.ts

Walkthrough

useSetPassword updates two fetch URL paths by inserting the v1 version segment: /api/authenticator/pub/... becomes /api/authenticator/v1/pub/.... This affects the setpassword and start endpoints. The test suite is updated to assert the new versioned URL substrings.

Changes

Authenticator API v1 path migration

Layer / File(s) Summary
Versioned API path update and test alignment
packages/core/src/sdk/account/useSetPassword.ts, packages/core/test/sdk/account/useSetPassword.test.ts
Both the setpassword and startLogin fetch URLs are updated to include the /v1 segment in the authenticator path. Test assertions for both endpoint URL substrings are updated to match the new paths.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

  • vtex/faststore#3380: Modifies the same useSetPassword.ts file to route calls to the authenticator endpoints (setpassword and start); this PR adds the /v1 versioning step on top of that migration.

Suggested reviewers

  • gabpaladino
  • renatamottam

Poem

A slash, a v1, dropped right in place,
The authenticator path now versioned with grace.
Two lines in the source, two lines in the test,
/pub/authentication — now properly dressed.
Small change, big clarity — version it right! 🚀

🚥 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 accurately summarizes the main change: versioning authenticator routes to v1. It is specific, concise, and directly reflects the core objective of the PR.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/authenticator-api-v1-versioning

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

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

@faststore/api

npm i https://pkg.pr.new/vtex/faststore/@faststore/api@7091ad8

@faststore/cli

npm i https://pkg.pr.new/vtex/faststore/@faststore/cli@7091ad8

@faststore/components

npm i https://pkg.pr.new/vtex/faststore/@faststore/components@7091ad8

@faststore/core

npm i https://pkg.pr.new/vtex/faststore/@faststore/core@7091ad8

@faststore/diagnostics

npm i https://pkg.pr.new/vtex/faststore/@faststore/diagnostics@7091ad8

@faststore/lighthouse

npm i https://pkg.pr.new/vtex/faststore/@faststore/lighthouse@7091ad8

@faststore/sdk

npm i https://pkg.pr.new/vtex/faststore/@faststore/sdk@7091ad8

@faststore/ui

npm i https://pkg.pr.new/vtex/faststore/@faststore/ui@7091ad8

commit: 7091ad8

@sonar-workflows

Copy link
Copy Markdown

@eduardoformiga
eduardoformiga merged commit a4ac863 into dev Jun 25, 2026
10 checks passed
@eduardoformiga
eduardoformiga deleted the fix/authenticator-api-v1-versioning branch June 25, 2026 14:14
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.

2 participants