shikhnu opened a new issue #12855:
URL: https://github.com/apache/superset/issues/12855


   Hi,
   
   While configuring oAuth, I am encountering some issues. I am using superset 
with the help of docker. 
   System: Linux (ubuntu 18.04)
   File location: 
/home/myuserx/incubator-superset/docker/pythonpath_dev/superset_config.py
   
   Below is the code used in superset_config.py
   ```
   # with the License.  You may obtain a copy of the License at
   #
   #   http://www.apache.org/licenses/LICENSE-2.0
   #
   # Unless required by applicable law or agreed to in writing,
   # software distributed under the License is distributed on an
   # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   # KIND, either express or implied.  See the License for the
   # specific language governing permissions and limitations
   # under the License.
   #
   # This file is included in the final Docker image and SHOULD be overridden 
when
   # deploying the image to prod. Settings configured here are intended for use 
in local
   # development environments. Also note that superset_config_docker.py is 
imported
   # as a final step as a means to override "defaults" configured here
   #
   
   import logging
   import os
   from flask_appbuilder.security.manager import (
       AUTH_OID,
       AUTH_REMOTE_USER,
       AUTH_DB,
       AUTH_LDAP,
       AUTH_OAUTH
   )
   #from flask_appbuilder.security.manager import AUTH_OID, AUTH_REMOTE_USER, 
AUTH_DB, AUTH_LDAP, AUTH_OAUTH
   basedir = os.path.abspath(os.path.dirname(__file__))
   ROW_LIMIT = 5000
   SUPERSET_WORKERS = 4
   SECRET_KEY = 'a long and random secret key'
   SQLALCHEMY_DATABASE_URI ='postgresql://superset:superset@db:5432/superset'
   CSRF_ENABLED = True
   AUTH_TYPE = AUTH_OAUTH
   AUTH_USER_REGISTRATION = True
   AUTH_USER_REGISTRATION_ROLE = "Public"
   OAUTH_PROVIDERS = [
           {
               'name':'google', 'icon':'fa-google', 'token_key':'access_token',
           'remote_app': {
               'client_id':'GOOGLE KEY',
               'client_secret':'GOOGLE SECRET',
               'api_base_url':'https://www.googleapis.com/oauth2/v2/',
               'client_kwargs':{
                 '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'}
       }
    ]
   
   ```
   Below is the error that I am encountering.
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, 
in reraise
       raise value
     File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 184, in 
find_app_by_string
       app = call_factory(script_info, attr, args)
     File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 119, in 
call_factory
       return app_factory()
     File "/app/superset/app.py", line 69, in create_app
       raise ex
     File "/app/superset/app.py", line 62, in create_app
       app_initializer.init_app()
     File "/app/superset/app.py", line 551, in init_app
       self.init_app_in_ctx()
     File "/app/superset/app.py", line 520, in init_app_in_ctx
       self.configure_fab()
     File "/app/superset/app.py", line 591, in configure_fab
       appbuilder.init_app(self.flask_app, db.session)
     File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/base.py", 
line 202, in init_app
       self.sm = self.security_manager_class(self)
     File 
"/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/sqla/manager.py",
 line 51, in __init__
       super(SecurityManager, self).__init__(appbuilder)
     File 
"/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/manager.py", 
line 250, in __init__
       from authlib.integrations.flask_client import OAuth
   ModuleNotFoundError: No module named 'authlib'
   
   ```
   
   I have also attached a screenshot of the error. I would appreciate it if 
anyone can help me out in resolving the issue.
   
   Regards.
   
![Error_SS](https://user-images.githubusercontent.com/56694179/106431157-d8309f00-6492-11eb-83fd-80b540f0e33f.png)
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to