Utsavjain4561 opened a new issue, #24540:
URL: https://github.com/apache/superset/issues/24540

   Hi everyone
   I was trying to integrate a custom OAuth provider in superset with the 
following config 
   
   ```
   AUTH_TYPE = AUTH_OAUTH
   AUTH_ROLES_SYNC_AT_LOGIN = True
   AUTH_USER_REGISTRATION = True
   AUTH_USER_REGISTRATION_ROLE = "Public"
   OAUTH_PROVIDERS = [
       {
           "name": "olympus",
           "icon": "fa-icon",
           "token_key": "access_token",
           "remote_app": {
               "client_id": "GARFIELD_NB6",
               "client_secret": "033c042e-298a-479a-9c19-a5cf1bd73530",
               "access_token_params": {
                   "client_id": "GARFIELD_NB6",
                   "client_secret": "033c042e-298a-479a-9c19-a5cf1bd73530",
                   "grant_type": "authorization_code"
               },
               "access_token_method": "POST",
               "api_base_url": "https://olympus-im-stage.phonepe.com/";,
               "client_kwargs": {"scope": "email groups read write"},
               "request_token_url": None,
               "access_token_url": 
"https://olympus-im-stage.phonepe.com/olympus/im/v1/oauth/token";,
               "authorize_url": 
"https://olympus-im-stage.phonepe.com/olympus/im/v1/oauth/authorize";
           }
       }
   ]
   ```
   
   While following the authentication flow, I am getting 401 response while 
requesting for `access_token`
   Checked with my OAuth provider but nothing has changed from their end 
   
   Below is the error 
   
   ```
   2023-06-28 09:07:14,705:DEBUG:flask_appbuilder.security.views:Provider: 
olympus
   2023-06-28T09:07:14.708315628Z 2023-06-28 
09:07:14,707:DEBUG:flask_appbuilder.security.views:Going to call authorize for: 
olympus
   2023-06-28T09:07:14.723122503Z 172.18.0.1 - - [28/Jun/2023:09:07:14 +0000] 
"GET /login/olympus?next= HTTP/1.1" 302 851 "http://localhost:8088/login/"; 
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/114.0.0.0 Safari/537.36"
   2023-06-28T09:07:20.933369506Z 2023-06-28 
09:07:20,932:DEBUG:flask_appbuilder.security.views:Authorized init
   2023-06-28T09:07:20.951534214Z 2023-06-28 
09:07:20,950:DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 
olympus-im-stage.phonepe.com:443
   2023-06-28T09:07:21.904032465Z 2023-06-28 
09:07:21,903:DEBUG:urllib3.connectionpool:https://olympus-im-stage.phonepe.com:443
 "POST /olympus/im/v1/oauth/token HTTP/1.1" 401 255
   2023-06-28T09:07:21.915088923Z 2023-06-28 
09:07:21,913:DEBUG:flask_appbuilder.security.views:OAUTH Authorized resp: 
{'code': 'INVALID_TOKEN', 'message': 'Token data is either not available or 
empty', 'context': {'message': 'JWT processing failed. Additional details: 
[[17] Unexpected exception encountered while processing JOSE object 
(java.lang.NullPointerException): null]'}}
   2023-06-28T09:07:21.915850840Z 2023-06-28 
09:07:21,915:ERROR:flask_appbuilder.security.views:Error returning OAuth user 
info: 'access_token'
   2023-06-28T09:07:21.925776173Z 
   ```
   
   
   Can you please help in resolving this as we are blocked on this for some 
quiet long time to complete the OAuth integration 


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

To unsubscribe, e-mail: [email protected]

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