-
Notifications
You must be signed in to change notification settings - Fork 639
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
OAuth open URL in default browser, set success message and throw desc… #1396
base: dev
Are you sure you want to change the base?
Conversation
stevenleadbeater
commented
Nov 16, 2024
- [oauth] Open authorization URL in default browser
- [oauth] Allow optionally passing success message to display on browser return page
- [oauth] Throw specific errors on failure states
My initial thought is I should have made this an object rather than just a function, having to break the API just to support a custom response message is a shame. |
Is it worth working this up a bit more so that there are overloads instead without too much copy paste? I don't mind doing the leg work on that. It would mean you can keep the existing API and we can add a method to pass the message |
I think that sounds good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
@stevenleadbeater friendly nudge - would you address the comment you and @kingosticks discussed above? |
There was another issue recently where they needed to do something different for android. I can't remember or find it now. My point is we could do with way to pass more options without breaking API (builder pattern maybe?). |
Another option besides builder pattern that allows flexible parameters adjustment, is an |
But if you add a new arg to that, isn't that still a breaking ApI change? |
If the struct with the args doesn't have But even then people could initialize it directly and that would result in breaking changes... So yeah not fault proof but a very simple alternative and an easy solution to not break existing apis, but going forward not so good. Just had the "best" case in mind. |
Happy with the idea that people who program defensively against breaking changes are catered for. Sounds good, easy is good. |