Skip to content

Commit

Permalink
Make sure that redirect uri uses IPv4 address of localhost
Browse files Browse the repository at this point in the history
maybe it's a PyQt6-6.7.1 issue, maybe not, but running from source is fine
and running from frozen may be fine and may be not -- reason is unknown (yet)
  • Loading branch information
Gatsik committed Aug 4, 2024
1 parent ae7c7ea commit 52b970e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/oauth/oauth_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ class OAuthReplyHandler(QOAuthHttpServerReplyHandler):
def callback(self) -> str:
with_trailing_slash = super().callback()
# remove trailing slash because server does not accept it
return with_trailing_slash.removesuffix("/")
without_trailing_slash = with_trailing_slash.removesuffix("/")
# sometimes it's 127.0.0.1, sometimes it magically becomes 'localhost' --
# make it deterministic
return without_trailing_slash.replace("localhost", "127.0.0.1")


@with_logger
Expand Down

0 comments on commit 52b970e

Please sign in to comment.