You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/06/20 02:49:22 UTC
[GitHub] [incubator-superset] victortony opened a new issue #7739: Custom
OAuth issue
victortony opened a new issue #7739: Custom OAuth issue
URL: https://github.com/apache/incubator-superset/issues/7739
A 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.
#### Screenshots

If applicable, add screenshots to help explain your problem.
#### How to reproduce the bug

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
### Environment
(please complete the following information):
- superset version: `Superset 0.999.0dev`
- python version: `3.6.6`
- node.js version: `node -v`
- npm version: `npm -v`
### 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 "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 2328, in __call__
return self.wsgi_app(environ, start_response)
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 2314, in wsgi_app
response = self.handle_exception(e)
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 1760, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/home/zhangyan/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 "/home/zhangyan/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 "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/home/zhangyan/src/superset/superset/venv/lib/python3.6/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/zhangyan/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'
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org