Open resulraveendran opened 7 months ago
Hi @resulraveendran did you got the solution because I am too facing the same issue while integrating Microsoft SSO. You can see my full issue on this link
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':''}
...
In this you need to use (in my case i'm using email for checking)
user = self.find_user(email=data['mail'])
login_user(user, remember=False)
user_info = {
'name' : user['name'],
'email' : user['email'],
'id' : user['id'],
'username' : user['username'],
'first_name': user['first_name'],
'last_name': user['last_name'],
# 'role': user['role']
}
return user_info
data is from Azure Entra Get me
but unfortunately I'm still having issue Invalid login, Please try again, but it's still work like login successful. Any advice?
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. nvalid login. Please try again. when I clicked the login button. First I got the login page of zitadel after that redirected to superset , From there i got this issueFrom superset app
my superset_config.py is
and my custom_sso_security_manager.py file is
Please give me a solution for this or any suggestion to resolve the issue.