diff --git a/src/pybind/mgr/dashboard/controllers/saml2.py b/src/pybind/mgr/dashboard/controllers/saml2.py index d16ab7da5a8cb..1599b6df4217b 100644 --- a/src/pybind/mgr/dashboard/controllers/saml2.py +++ b/src/pybind/mgr/dashboard/controllers/saml2.py @@ -69,7 +69,7 @@ def auth_response(self, **kwargs): token = JwtManager.gen_token(username) JwtManager.set_user(JwtManager.decode_token(token)) - token = token.decode('utf-8') + token = token.decode('utf-8') if isinstance(token, bytes) else token self._set_token_cookie(url_prefix, token) raise cherrypy.HTTPRedirect("{}/#/login?access_token={}".format(url_prefix, token))