Hi everyone,
I’m getting the “nonce option is required” on IE10.
The packages I’m using are auth0.js v9.6.1 and auth0-lock v11.7.2.
Below is my code:
var options = {
allowSignUp: false,
audience: clientDomain+'/userinfo',
allowShowPassword: true,
auth: {
params: {
scope: 'openid'
},
redirectUrl: callbackUrl
},
closable: false,
error: {
login: {
'lock.fallback': 'Wrong email or password',
'lock.invalid_email_password': 'Wrong email or password'
}
}
};
var lock = new Auth0Lock(clientId, clientDomain, options);
var auth0 = new auth0.WebAuth({
domain: clientDomain,
clientID: clientId,
redirectUri: callbackUrl,
responseType: 'token'
});
auth0.checkSession({}, function(err, ssoData) {
if (!err && ssoData) {
auth0.authorize({
scope: 'openid',
responseType: 'code',
redirectUri: callbackUrl
});
} else {
lock.on('signin ready', function () {
var link = $('<button class="auth0-lock-social-button auth0-lock-social-small-button" data-provider="windowslive" type="button">' +
'<div class="auth0-lock-social-button-icon"></div>' +
'<div class="auth0-lock-social-button-text">Log in with Internal Account</div>' +
'</button>');
link.on('click', function () {
auth0.authorize({
connection: enterpriseConnection,
scope: 'openid',
responseType: 'code',
redirectUri: callbackUrl
});
});
$('.auth0-lock-social-buttons-container').append(link);
lock.show();
});
}
});
What’s happening now is that the getSSOData is being triggered in auth0-lock, and the checkSession method in there is using a predefined set of options where “token id_token” is set as its response type. The condition that’s currently triggering the error message is:
o.responseType.indexOf('code') === -1 && o.responseType.indexOf('id_token') !== -1
Is there a way where I can get auth0 working for IE10?