question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom OAuth issue

See original GitHub issue

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.

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:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:29 (10 by maintainers)

github_iconTop GitHub Comments

8reactions
jtzlcommented, Jul 25, 2019

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’

3reactions
colax94commented, Jun 28, 2019

I have the same issue after upgrading to 0.28.1, please help

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create a Custom OAuth2 Connection | API Connector
I think the main issue is that the Auth Code (used to then obtain the OAUTH token) is not returned as JSON, it...
Read more >
Verifying OAUTH configuration for Custom Connectors
Custom Connector connections fail due to authentication failures. Sample Error Message: Alert Your Connection Name connection isn't working. Cause. One or more ...
Read more >
Connect Apps to Generic OAuth2 Authorization Servers - Auth0
To create a new Custom Social Connection, navigate to Auth0 Dashboard > Authentication > Social, click Create Connection, scroll to the bottom of...
Read more >
custom oauth error - Help & Support - Invision Community
I'm trying to add oauth from invision to hesk but it gives me these errors: Quote TypeError: array_merge(): Argument #1 must be of...
Read more >
Configure Snowflake OAuth for Custom Clients
This topic describes how to configure OAuth support for custom clients. In this Topic: Workflow. Step 1: Create a Snowflake OAuth Integration.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found