Skip to content

Clarify OAuth verifier flow and warn on echo-default callback#170

Merged
beaufour merged 1 commit into
masterfrom
fix-oauth-callback-docs
Jun 27, 2026
Merged

Clarify OAuth verifier flow and warn on echo-default callback#170
beaufour merged 1 commit into
masterfrom
fix-oauth-callback-docs

Conversation

@beaufour

Copy link
Copy Markdown
Collaborator

Summary

Addresses the confusion reported in #169, where a user following the OAuth flow received a flickr.test.echo response string and couldn't tell which part was the verification code.

The root cause is the default callback: when none is passed to AuthHandler, it points at a flickr.test.echo REST 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 the oauth_verifier portion is actually needed by set_verifier().

Changes

  • Rewrite the module docstring to explain where oauth_verifier comes from, document the callback="oob" option, and call out the echo-default gotcha explicitly.
  • Add an __init__ docstring describing the callback parameter.
  • Emit a warnings.warn(...) when the echo-default callback is used, pointing users to callback="oob".

Compatibility

No behavior change — the default callback is unchanged; this only adds documentation and a warning.

Closes #169

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>
@beaufour beaufour merged commit 958db48 into master Jun 27, 2026
10 checks passed
@beaufour beaufour deleted the fix-oauth-callback-docs branch June 27, 2026 21:22
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

Successfully merging this pull request may close these issues.

Which verification code?

1 participant