Custom OAuth issue
See original GitHub issueA clear and concise description of what the bug is.
hi, i configure my oauth login according to http://superset.apache.org/installation.html#custom-oauth2-configuration. Everything is right, but it turns wrong when the code runs at “oauth_authorized” method in views.py. The problem is all the args in functions “redirect” may be wrong, such as “redirect(“login”)”, “redirect(next_url)”. I think it would be “redirect(self.appbuilder.get_url_for_login)”. And another question is the value of “nex_url” which is empty, and the correct value maybe “/superset/welcome”. Would you please help me to solve this problem? Thank you.
Expected results
When success, rediect to “/superset/welcome”.Otherwise, redirect to “self.appbuilder.get_url_for_login”. what you expected to happen.
Actual results
When success/failed, rediect to “/oauth-authorized/login” what actually happens.
Environment
(please complete the following information):
- superset version:
Superset 0.999.0dev
- python version:
3.6.6
How to reproduce the bug
click oauth login
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
Add any other context about the problem here. 2019-06-20 10:00:39,487:INFO:werkzeug:127.0.0.1 - - [20/Jun/2019 10:00:39] “GET /oauth-authorized/login HTTP/1.1” 500 - Traceback (most recent call last): File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 2328, in call return self.wsgi_app(environ, start_response) File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 2314, in wsgi_app response = self.handle_exception(e) File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 1760, in handle_exception reraise(exc_type, exc_value, tb) File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/_compat.py”, line 36, in reraise raise value File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 2311, in wsgi_app response = self.full_dispatch_request() File “src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 1834, in full_dispatch_request rv = self.handle_user_exception(e) File “src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 1737, in handle_user_exception reraise(exc_type, exc_value, tb) File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/_compat.py”, line 36, in reraise raise value File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 1832, in full_dispatch_request rv = self.dispatch_request() File “/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py”, line 1818, in dispatch_request return self.view_functionsrule.endpoint File “/src/superset/superset/venv/lib/python3.6/site-packages/flask_appbuilder/security/views.py”, line 677, in oauth_authorized resp = self.appbuilder.sm.oauth_remotes[provider].authorized_response() KeyError: ‘login’
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:29 (10 by maintainers)
Top GitHub Comments
Same here, also 0.28.1. Also please help 😃
Sorry, something went wrong 500 - Internal Server Error Stacktrace Traceback (most recent call last): File “/home/superset/venv/lib64/python3.6/dist-packages/flask/app.py”, line 1982, in wsgi_app response = self.full_dispatch_request() File “/home/superset/venv/lib64/python3.6/dist-packages/flask/app.py”, line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File “/home/superset/venv/lib64/python3.6/dist-packages/flask/app.py”, line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File “/home/superset/venv/lib64/python3.6/dist-packages/flask/_compat.py”, line 33, in reraise raise value File “/home/superset/venv/lib64/python3.6/dist-packages/flask/app.py”, line 1612, in full_dispatch_request rv = self.dispatch_request() File “/home/superset/venv/lib64/python3.6/dist-packages/flask/app.py”, line 1598, in dispatch_request return self.view_functionsrule.endpoint File “/home/superset/venv/lib64/python3.6/dist-packages/flask_appbuilder/security/views.py”, line 677, in oauth_authorized resp = self.appbuilder.sm.oauth_remotes[provider].authorized_response() KeyError: ‘login’
I have the same issue after upgrading to 0.28.1, please help