Auth0 Home Blog Docs

Lock in popup mode, audience and oidcConformant

lock
audience
popup

#1

It seems there is something wrong in the way I do things.

I have the following code:

var lock = new Auth0Lock('secret','domain',{
    oidcConformant: true,
    auth: {
        redirect: false,
        responseType: 'token',
        params: {
            scope: 'openid profile email name'
        },
        audience: 'myaudience'
    }
});

And when I try it on my website, the popup shows up, but instead of coming back to my page once the authentication is finish, it redirects the popup to the original page…

It used to work fine without the audience and without to oidcConformant, but then the token wouldn’t be recognized by my API.


#2

What you experienced is a limitation of the library, in particular, when oidcConformant is enabled (which is required for the use of audience) the popup mode is not supported.

The above is per the information available in the Lock repository, in particular, within the oidcConformant section. In addition, per this issue, it seems this is not intended to be supported.


#3

@jmangelo : ok thanks. Since I posted this I switched to Auth.js, which does support audience and popup mode.


#4