Auth0 Home Blog Docs

In what case is the "response_type" undefined?

lock

#1

Hi!

The following code-snippet is from the Auth0 Hosted login page:


#2

Hi!

The following code-snippet is from the Auth0 Hosted login page:

       responseType: (config.internalOptions || {}).response_type ||
                (config.callbackOnLocationHash ? 'token' : 'code'),

In what use-case do we expect that the responseType is undefined?

We have an issue where the responseType is undefined in a small case of our requests to Auth0. It then defaults back to the ‘code’ responseType (the original responseType is ‘id_token’). We are unable to find out why the responseType gets set back to the default value (in our case ‘code’)

Can we safely change the default response_type from ‘code’ to ‘id_token’, e.g.

            responseType: (config.internalOptions || {}).response_type ||
                (config.callbackOnLocationHash ? 'token' : 'id_token')