Skip to content

feat(auth): pass callback url through login#96

Merged
altaywtf merged 1 commit into
mainfrom
feat/auth-login-callback-url
Jun 29, 2026
Merged

feat(auth): pass callback url through login#96
altaywtf merged 1 commit into
mainfrom
feat/auth-login-callback-url

Conversation

@altaywtf

@altaywtf altaywtf commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

Adds a callbackUrl option to auth.login and serializes it as callback_url for the credential login endpoint.

Changed

  • Adds a public LoginInput type for the auth login surface
  • Reuses that type in the Promise client
  • Sends callback_url through the existing query builder
  • Updates request-shape coverage and README usage

Risks

Low. Existing login calls keep the same required fields and the new field is optional. Current backend behavior accepts the query parameter but does not enforce callback behavior yet, so server-side callback validation remains a backend follow-up.

Verification

  • vp run verify
  • git diff --check
  • focused live probe confirmed login requests with callback_url are accepted and resulting tokens validate
  • autoreview --mode branch --base origin/main clean

Complexity

Neutral. This narrows duplicate inline typing by sharing the public login input type.


Summary by cubic

Add optional callbackUrl to auth.login, sent as callback_url in the login request. Introduces a public LoginInput type used by the Promise client, with tests and README updated.

Written for commit e33b8c3. Summary will update on new commits.

Review in cubic

Copilot AI review requested due to automatic review settings June 29, 2026 11:23

Copilot AI 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.

Pull request overview

Adds an optional callbackUrl to the auth.login API surface and forwards it to the credentials login endpoint as the callback_url query parameter, while reducing duplicated inline typing by introducing a shared public input type.

Changes:

  • Introduces LoginInput as a public type for auth.login.
  • Updates auth.login to serialize callbackUrl as callback_url in the request query.
  • Reuses LoginInput in the Promise client and updates request-shape test + README usage.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/domains/auth.ts Adds LoginInput and forwards callbackUrl as callback_url in login query params.
src/domains/auth.spec.ts Updates auth flow coverage to assert callback_url is included/encoded in the login request URL.
src/core/client.ts Reuses the shared LoginInput type for the Promise client auth.login signature.
README.md Updates login usage example to include the optional callbackUrl field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 4 files

Re-trigger cubic

@altaywtf altaywtf merged commit db8a05f into main Jun 29, 2026
10 checks passed
@altaywtf altaywtf deleted the feat/auth-login-callback-url branch June 29, 2026 11:26
@putio-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 9.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants