Open
Conversation
…l flag Replace the unconditional URL open and exit on invalidver with a configurable autoOpenDownloadUrl flag (default false). When disabled, the library stores the download link and returns control to the caller, allowing custom error handling. Set true before init() to restore the old auto-open-and-exit behavior.
Populate response.message with a detailed diagnostic string when invalidver is returned and the download link is blank, allowing the caller to display the error in their own UI. When the download link is present, response.message is set to "invalidver" for easy detection.
…flag, which defaults to true for backward compatibility.
ELF-Nigel
approved these changes
Mar 9, 2026
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

When using
invalidverhandling in my loaders, the library always opened the download URL and exited before my code could run. That prevented showing a custom error (e.g. console message + countdown) or usingapp_data.downloadLinkin my own UI. This change makes the old auto-open-and-exit behavior opt-in viaauto_open_download_url, and ensuresresponse.messageis set so callers can detect and display the error. Example of the flow I wanted to support:The default is
auto_open_download_url= true, so existing code keeps the original behavior (open URL and exit). No changes required for current users. I consider that behavior broken for loaders that want to handle the error themselves; setauto_open_download_url = falsebeforeinit()to get the new behavior.Summary
auto_open_download_urlflag (defaulttrue) controls invalidver behavior. Whentrue, behavior is unchanged: open download URL if set, then exit. Whenfalse, the library stores the download link and returns so the caller can handle the error.invalidver,response.messageis now set so callers can show a clear message:"invalidver"so the caller can detect and display it.Behavior
auto_open_download_urltrue(default)exit(0). No change for existing users.falseapp_data.downloadLinkandresponse.messageare set for the caller.Files
auth.hpp: addedbool auto_open_download_url = true;auth.cpp: invalidver block updated to setresponse.messageand to open/exit only whenauto_open_download_urlis true