Skip to content

fix(oauth1): correct protocol name in InsecureTransportError description - #919

Merged
lepture merged 1 commit into
authlib:mainfrom
RavSinghChandan:fix-oauth1-insecure-transport-description
Aug 11, 2026
Merged

fix(oauth1): correct protocol name in InsecureTransportError description#919
lepture merged 1 commit into
authlib:mainfrom
RavSinghChandan:fix-oauth1-insecure-transport-description

Conversation

@RavSinghChandan

Copy link
Copy Markdown

Noticed this while reading through #627 — the OAuth1 InsecureTransportError
carries the description string from its OAuth2 counterpart, so its message
reads "OAuth 2 MUST utilize https." An OAuth 1.0a client hitting an http://
endpoint gets told it must use HTTPS for a protocol it isn't even using.

It's in authlib/oauth1/rfc5849/errors.py line 29. The same string is in
authlib/oauth2/rfc6749/errors.py line 59, which is where it belongs — this
only touches the OAuth1 copy, so the OAuth2 one is untouched. Nothing asserts
the old text anywhere, and it's only a description, so behaviour is the same.

tests/core and tests/flask/test_oauth1 both pass, ruff is clean.

#627 also asks about dropping the transport check from OAuth1 altogether.
That one's a behaviour change so I left it alone — happy to look at it
separately if you want it, but this bit seemed worth fixing on its own
either way.

The OAuth1 InsecureTransportError carried the description string from its
OAuth2 counterpart, so an OAuth 1.0a client hitting an http:// endpoint was
told "OAuth 2 MUST utilize https."

The identical string is still present in authlib/oauth2/rfc6749/errors.py,
where it belongs. No behaviour change.
@lepture
lepture merged commit 772bc72 into authlib:main Aug 11, 2026
8 checks passed
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.

2 participants