Clarify OAuth verifier flow and warn on echo-default callback#170
Merged
Conversation
The default `callback` (when none is passed to AuthHandler) points at a flickr.test.echo endpoint. After authorizing, users are redirected there and Flickr echoes back all OAuth parameters, which is widely mistaken for "the verification code" (see #169). Only the `oauth_verifier` portion is needed by set_verifier(). - Rewrite the module docstring to explain where oauth_verifier comes from and document the `callback="oob"` option. - Add an __init__ docstring describing the callback parameter. - Emit a warning when the echo-default callback is used, pointing users to callback="oob". No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
Addresses the confusion reported in #169, where a user following the OAuth flow received a
flickr.test.echoresponse string and couldn't tell which part was the verification code.The root cause is the default
callback: when none is passed toAuthHandler, it points at aflickr.test.echoREST endpoint. After authorizing, the user is redirected there and Flickr echoes back all the OAuth parameters — which is easily mistaken for "the verification code". Only theoauth_verifierportion is actually needed byset_verifier().Changes
oauth_verifiercomes from, document thecallback="oob"option, and call out the echo-default gotcha explicitly.__init__docstring describing thecallbackparameter.warnings.warn(...)when the echo-default callback is used, pointing users tocallback="oob".Compatibility
No behavior change — the default callback is unchanged; this only adds documentation and a warning.
Closes #169