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/09/24 13:42:23 UTC

[GitHub] [incubator-superset] amodig commented on issue #7739: Custom OAuth issue

amodig commented on issue #7739: Custom OAuth issue
URL: https://github.com/apache/incubator-superset/issues/7739#issuecomment-534564038
 
 
   This issue seems to still exist. Just upgraded from 0.28.1 to 0.34.0.
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/async.py", line 56, in handle
       self.handle_request(listener_name, req, client, addr)
     File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 160, in handle_request
       addr)
     File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/async.py", line 107, in handle_request
       respiter = self.wsgi(environ, resp.start_response)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
       return self.wsgi_app(environ, start_response)
     File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 228, in __call__
       return self.app(environ, start_response)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app
       response = self.handle_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
       response = self.full_dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
       rv = self.handle_user_exception(e)
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
       reraise(exc_type, exc_value, tb)
     File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
       raise value
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request
       rv = self.dispatch_request()
     File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request
       return self.view_functions[rule.endpoint](**req.view_args)
     File "/usr/local/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'
   ```
   
   The most relevant part of `superset_config.py`:
   ```
   AUTH_TYPE = AUTH_OAUTH
   AUTH_ROLE_PUBLIC = 'Public'
   AUTH_USER_REGISTRATION = True
   AUTH_USER_REGISTRATION_ROLE = 'Gamma'
   CSRF_ENABLED = True
   ENABLE_PROXY_FIX = True
   PREFERRED_URL_SCHEME = 'https'
   OAUTH_PROVIDERS = [
       {
          'name': 'google',
          'whitelist': ['@armadainteractive.com'],
          'icon': 'fa-google',
          'token_key': 'access_token',
          'remote_app': {
               'base_url': 'https://www.googleapis.com/oauth2/v2/',
               'request_token_params': {
                 'scope': 'email profile'
               },
               'request_token_url': None,
               'access_token_url': 'https://accounts.google.com/o/oauth2/token',
               'authorize_url': 'https://accounts.google.com/o/oauth2/auth',
               'consumer_key': GOOGLE_OAUTH_KEY,
               'consumer_secret': GOOGLE_OAUTH_SECRET
           }
       }
   ]
   ```
   
   

----------------------------------------------------------------
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