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

Support for get_auth_code_manually to work with generic channels #7

Open
roykim98 opened this issue Dec 23, 2024 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@roykim98
Copy link
Contributor

I have been using this commit since you implemented it: 62db905#diff-95eb5afe64e2d10a8f9a34145dbb1fe9d99ca910471f4325e2fc3635d92a89edR115 and have found it extremely helpful, especially when working on a remote machine and the callback doesn't work seamlessly with what's registered in Schwab.

I have reviewed #1, and I think there is still a helpful use-case to get some kind of channel based manual auth. If you're okay with it, I'd like to work on this and open a pull request to support this functionality.

Namely, instead of explicitly relying on stdout to provide the authorization link and stdin to provide the callback URL containing the token, I'd like to make introduce another function that uses a generic tx and rx channel, where the default implementation could still utilize stdout and stdin. This way, there is no change in functionality for users. But by exposing a generic trait, it could open up usecases where authentication could be push-based (e.g., tx to sms, email, or some other webhook / mfa mechanism, and then rx to provide the callback). This would allow users to authenticate without an explicit TTY session.

Please let me know what you think.

@z-Wind
Copy link
Owner

z-Wind commented Dec 23, 2024

Thank you for the detailed explanation. I think this is a great suggestion, and it would definitely enhance flexibility for various use cases. Adding a generic tx and rx channel-based manual authentication sounds like a valuable improvement, especially for scenarios without an explicit TTY session. I’m happy for you to work on this and open a pull request. Looking forward to seeing your implementation!

@z-Wind z-Wind added the enhancement New feature or request label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants