Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ability to add auth tokens in the subscribe to run and subscribe to batch calls #1646

Open
cavuchris opened this issue Jan 28, 2025 · 1 comment

Comments

@cavuchris
Copy link

Is your feature request related to a problem? Please describe.

Current Behavior:

The auth.configure function allows me to add an access token on the front end to subscribe to real-time updates for runs. However, it only supports a single token. This creates challenges when managing processes that involve multiple runs, particularly when the runs depend on each other and cannot be batched.

For example:

The results of one batch run need to be passed into another batch as soon as they become available.
In such scenarios, subscribing to updates for all relevant calls becomes difficult due to the single-token limitation.

Why This Matters:

For non-React users, this approach provides a more flexible and practical interim solution until a better, more robust alternative (like React hooks for real-time updates) is available.

Describe the solution you'd like to see

Proposed Solution:

Enable subscribeToRun and subscribeToBatch to accept a token when called. This would significantly enhance the usability of real-time functions, especially for developers not using React.

Describe alternate solutions

Currently, I'm creating unique tags for a series of calls. While this is adequate, it gets a bit difficult to follow in the code and feels more hacky than I'm used to with Trigger's phenomenal DX.

Additional information

No response

@cavuchris
Copy link
Author

From Discord chat with Matt:
An option needs to be added here for the token, then that needs to be passed to getRealtimeHeaders and it would use that instead of the normal bearer token.

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

No branches or pull requests

1 participant