resulraveendran opened a new issue, #28103:
URL: https://github.com/apache/superset/issues/28103
Hi,
When I try to configure SSO using Zitadel and superset by referring this
document
`https://superset.apache.org/docs/installation/configuring-superset#custom-oauth2-configuration`.
I got this issue. I got a login page and when I clicked on login I got this
error
```
{"error":"invalid_request","error_description":"The requested redirect_uri
is missing in the client configuration. If you have any questions, you may
contact the administrator of the application."}
```
my superset_config.py is
```
from flask_appbuilder.security.manager import AUTH_OAUTH
from custom_sso_security_manager import CustomSsoSecurityManager
# Set the authentication type to OAuth
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{ 'name':'drhSSO',
'token_key': "access_token", # Name of the token in the response of
access_token_url
'icon':'fa-address-card', # Icon for the provider
'remote_app': {
'client_id':'2628489275@drh-admin', # Client Id (Identify
Superset application)
'client_secret':'USC5otaTy4Grm6jDMjhKbH', # Secret for this
Client Id (Identify Superset application)
'client_kwargs':{
'scope': 'openid profile' # Scope for the
Authorization
},
'access_token_method':'POST', # HTTP Method to call
access_token_url
'access_token_params':{ # Additional parameters for calls
to access_token_url
'client_id':'USC5otaTy4GrMdxym6jDMjhKbH'
},
'jwks_uri':'https://idi.drective.com/oauth/v2/keys', # may be
required to generate token
'access_token_headers':{ # Additional headers for calls to
access_token_url
'Authorization': 'Basic
MjYyODQ4OTk0NjIxODc4Mjc1QGRyaC1hZG1pblVTQzVvdGFUeTRHck02c29DN1hyZG1XcFdodlF3dGx2Znl4aXpCVEpLT3RXY0doUm96Y2R4eW02akRNamhLYkg='
},
'api_base_url':'https://idi.drective.com/oauth/v2',
'access_token_url':'https://idi.drective.com/oauth/v2/token',
'authorize_url':'https://idi.drective.com/oauth/v2/authorize',
'redirect_uri':'https://ss.drh.diabetestechnology.org/oauth-authorized/drhSSO'
}
}
]
# Will allow user self registration, allowing to create Flask users from
Authorized User
AUTH_USER_REGISTRATION = True
# The default user self registration role
AUTH_USER_REGISTRATION_ROLE = "Public"
CUSTOM_SECURITY_MANAGER = CustomSsoSecurityManager
```
and my custom_sso_security_manager.py file is
```
import logging
from superset.security import SupersetSecurityManager
class CustomSsoSecurityManager(SupersetSecurityManager):
def oauth_user_info(self, provider, response=None):
logging.debug("Oauth2 provider: {0}.".format(provider))
if provider == 'drhSSO':
# As example, this line request a GET to base_url + '/' +
userDetails with Bearer Authentication,
# and expects that authorization server checks the token, and response
with user details
me =
self.appbuilder.sm.oauth_remotes[provider].get('userDetails').data
logging.debug("user_data: {0}".format(me))
return { 'name' : me['name'], 'email' : me['email'], 'id' :
me['user_name'], 'username' : me['user_name'], 'first_name':'', 'last_name':''}
...
```
Please give me a solution for this or any suggestion to resolve the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]