Feature description
Right now, we use RAGBITS_BASE_URL environment variable to specify the address to which redirect during OAuth flow. It would be more convenient to be able to omit the variable completely and use relative paths if possible or at least pass it via the __init__ of RagbitsAPI.
Motivation
Right now, the default is "http://localhost:8000", which messes up the OAuth flow when the app is deployed. Since we usually host the frontend and backend on the same domain, I would argue that by default that variable should be empty, and all the redirects relative.
Relevant method: _handle_oauth2_callback, for example:
if not access_token:
return RedirectResponse(
url=f"{self.frontend_base_url}/login?error=token_exchange_failed", status_code=302
)
Here, I think, we can just use "/login?error=token_exchange_failed" as URL by default.
Additional context
No response
Feature description
Right now, we use
RAGBITS_BASE_URLenvironment variable to specify the address to which redirect during OAuth flow. It would be more convenient to be able to omit the variable completely and use relative paths if possible or at least pass it via the__init__ofRagbitsAPI.Motivation
Right now, the default is "http://localhost:8000", which messes up the OAuth flow when the app is deployed. Since we usually host the frontend and backend on the same domain, I would argue that by default that variable should be empty, and all the redirects relative.
Relevant method:
_handle_oauth2_callback, for example:Here, I think, we can just use "/login?error=token_exchange_failed" as URL by default.
Additional context
No response