mrtsrdm commented on issue #23443:
URL: https://github.com/apache/superset/issues/23443#issuecomment-1478955593
@mdeshmu
ı tried. However, the situation is the same.
By the way, ı have no 'id_token', ı called my logout api with current access
token, and session has expired by logout api. However, superset re-received
code with user credentials and new token with new code.
how can ı expire session cookie in the browser ?
an this is my oauth_user_info ->
def oauth_user_info(self, provider, response=None):
access_token = response["access_token"]
session['id_token'] = access_token
headers = {'Authorization': 'Bearer %s' % (access_token)}
me = self.appbuilder.sm.oauth_remotes[provider].get("/tkn/parse/" +
access_token, headers=headers)
data = me.json()
json_object = json.loads(data)
logging.debug("User info from xx: %s", json_object["claims"])
for x in json_object["claims"]:
if x["Type"] == "mail":
email = x["Value"]
if x["Type"] == "id":
userid = x["Value"]
if x["Type"] == "username":
username = x["Value"]
logging.debug("Oauth2 provider: {0}.".format(provider))
logging.debug("Oauth2 provider: {0}.".format(response))
if provider == 'egaSSO':
return { 'username' : username, 'email': email, 'id': userid}
@expose("/logout/")
def logout(self):
self.appbuilder.app.config["LOGOUT_REDIRECT_URL"] =
("{0}?token={1}".format(
OKTA_BASE_URL + 'logout',
session.get('id_token')
))
return super().logout()
--
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]