Created
March 26, 2024 10:15
-
-
Save Vlasterx/37f0e16afd3e6d0944a5184e243e62b3 to your computer and use it in GitHub Desktop.
OLL Auth workaround
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
# Workaround for setting the redirect_uri to localhost. | |
# Host is set in proxy server.py and redirect_uri takes the request host value | |
# See https://github.com/openlawlibrary/platform/issues/4281 | |
def get_redirect_uri(self, state=None): | |
"""Build redirect with redirect_state parameter.""" | |
uri = self.redirect_uri | |
if self.REDIRECT_STATE and state: | |
uri = self.url_add_parameters(uri, {"redirect_state": state}) | |
if settings.DEBUG: | |
return uri.replace('127.0.0.1', 'localhost') | |
return uri |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment