Skip to content

chore: add source parameter to CustomAuth#471

Merged
chaitanyapotti merged 1 commit intomasterfrom
chore/add-source
Mar 25, 2026
Merged

chore: add source parameter to CustomAuth#471
chaitanyapotti merged 1 commit intomasterfrom
chore/add-source

Conversation

@arch1995
Copy link
Copy Markdown
Contributor

@arch1995 arch1995 commented Mar 25, 2026

Jira Link

N/A (no ticket in branch name)

Description

This PR adds an optional source parameter to CustomAuth constructor arguments, defaulting to "customauth", and passes it through to the Torus constructor.

Changes:

  • CustomAuthArgs: document and add optional source?: string (default "customauth").
  • login.ts: destructure source with default and forward it when constructing Torus.

How has this been tested?

  • npm run lint:ts — passed
  • npm run build — passed
  • npm test — all 26 tests passed

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Low Risk
Low risk: adds a new optional constructor argument with a default and only forwards it to Torus, without changing login flow or data handling.

Overview
Adds an optional source field to CustomAuthArgs (defaulting to "customauth") and wires it through the CustomAuth constructor.

CustomAuth now forwards source into the Torus constructor options, enabling callers to tag the origin of logins without affecting existing integrations.

Written by Cursor Bugbot for commit 1ce59ca. This will update automatically on new commits. Configure here.

@arch1995 arch1995 requested a review from a team as a code owner March 25, 2026 10:31
@chaitanyapotti chaitanyapotti merged commit 091dfb7 into master Mar 25, 2026
5 checks passed
@chaitanyapotti chaitanyapotti deleted the chore/add-source branch March 25, 2026 10:33
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