You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I'd like to allow tenants to provide their own Google OAuth2 credentials (client_id & client_secret) and authenticate through their own Google apps. Is there any way I can inject tenants' OAuth2 credentials in ConvertTokenView() based on what schema the request is made from?
Alternatively, I was thinking about dynamically modifying the following two settings.py settings:
# these are global, but i'd like each tenant to have their own credsSOCIAL_AUTH_GOOGLE_OAUTH2_KEY="<google_client_id>"SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET="<google_client_secret>"
However, this method does not work, because these two settings are only read once on Django server startup.
I have a multi-tenant Django app created using the django-tenants package. I successfully setup "global" social authentication using
social_core.backends.google.GoogleOAuth2
backend.Now, I'd like to allow tenants to provide their own Google OAuth2 credentials (
client_id
&client_secret
) and authenticate through their own Google apps. Is there any way I can inject tenants' OAuth2 credentials inConvertTokenView()
based on what schema the request is made from?Pseudocode:
Alternatively, I was thinking about dynamically modifying the following two settings.py settings:
However, this method does not work, because these two settings are only read once on Django server startup.
The text was updated successfully, but these errors were encountered: