You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sptrakesh (via GitHub)" <gi...@apache.org> on 2026/05/26 19:49:17 UTC

[D] Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo? [superset]

GitHub user sptrakesh created a discussion: Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo?

I am trying to set up Superset with OAuth2 (google) using the latest Docker image.  When I try to login, I get the following error in the logs:

```
2026-05-26 19:40:51,002:ERROR:flask_appbuilder.security.views:Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo?
```

I can see the redirect from Google with what looks like proper query strings in the next line.

My configuration is as follows:

```
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
    {
        'name': 'google',
        'token_key': 'access_token',
        'icon': 'fa-google',
        'remote_app': {
            'client_id': '<id>.apps.googleusercontent.com',
            'client_secret': '<secret>',
            'server_metadata_url': 'https://accounts.google.com/.well-known/openid-configuration',
            'request_token_params': {
                'scope': 'openid email profile'
            },
            'client_kwargs': {'scope': 'openid email profile'},
            'authorize_params': {'hd': '<domain>'}
        }
    }
]

OAUTH_USER_INFO = {
    'username': 'username',
    'email': 'email',
    'first_name': 'given_name',
    'last_name': 'family_name',
}

AUTH_ROLE_ADMIN = 'Admin'
AUTH_ROLE_PUBLIC = 'Public'
AUTH_USER_REGISTRATION = True
AUTH_USER_REGISTRATION_ROLE = "Alpha"
```

GitHub link: https://github.com/apache/superset/discussions/40452

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo? [superset]

Posted by "mg1986jp (via GitHub)" <gi...@apache.org>.
GitHub user mg1986jp added a comment to the discussion: Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo?

The error means your OAuth config is missing the full userinfo endpoint URL. When you set up the OAuth provider config in `superset_config.py`, you need to include `api_base_url` with the full Google URL.

Something like:

```python
OAUTH_PROVIDERS = [{
    'name': 'google',
    'icon': 'fa-google',
    'token_key': 'access_token',
    'remote_app': {
        'client_id': '...',
        'client_secret': '...',
        'api_base_url': 'https://www.googleapis.com/oauth2/v2/',
        'client_kwargs': {'scope': 'email profile'},
        'access_token_url': 'https://accounts.google.com/o/oauth2/token',
        'authorize_url': 'https://accounts.google.com/o/oauth2/auth',
        'userinfo_endpoint': 'https://openidconnect.googleapis.com/v1/userinfo',
    }
}]
```

The `userinfo_endpoint` needs to be a full URL with `https://`. Without it, Flask-AppBuilder just gets the string `userinfo` and tries to use it as a URL directly — hence "Invalid URL 'userinfo': No scheme supplied."

GitHub link: https://github.com/apache/superset/discussions/40452#discussioncomment-17083214

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [D] Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo? [superset]

Posted by "sptrakesh (via GitHub)" <gi...@apache.org>.
GitHub user sptrakesh added a comment to the discussion: Error returning OAuth user info: Invalid URL 'userinfo': No scheme supplied. Perhaps you meant https://userinfo?

Thanks!  I saw some documentation that recommended specifying the `server_metadata_url` instead of the individual URL's, but looks like that option does not work.

GitHub link: https://github.com/apache/superset/discussions/40452#discussioncomment-17090905

----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org