Using Lock I can pass a value to Auth0 Rules using a property on the params object like this:
var lockAuthOptions = {
redirectUrl: "https://example.com",
responseType: 'token id_token',
params: {
audience: 'http://myaudience',
myproperty: "hello rule!!"
}
}
and access it in a rule like this:
function (user, context, callback) {
var value = context.request.query.myproperty;
return callback(null, user, context);
}
How do I accomplish the same using Universal login and WebAuth?
var webAuth = new auth0.WebAuth({
domain: "authodomain.com",
clientID: "clientId",
responseType: 'token id_token',
params: {
myproperty: "Not working"
},
myproperty: "Not working,
audience: "https://myaudience",
scope: "scopes",
extraParams: { myproperty: "Not working" },
state: "mystate",
redirectUri: "http://example.com"
});
webAuth.authorize();