Skip to content

Commit a113707

Browse files
committed
Initialize Lock parameters during initialization
1 parent f019723 commit a113707

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

articles/sso/single-page-apps-sso.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,16 @@ The full code sample for both the SPA applications as well as the normal web app
8383
document.body.style.display = 'none';
8484
8585
// instantiate Lock
86-
var lock = new Auth0Lock(''${account.clientId}', ''${account.namespace}');
86+
var lock = new Auth0Lock('${account.clientId}', '${account.namespace}', {
87+
auth: {
88+
params: {
89+
scope: 'openid name picture'
90+
}
91+
}
92+
});
8793
var auth0 = new Auth0({
88-
domain: ''${account.namespace}',
89-
clientID: ''${account.clientId}',
94+
domain: '${account.namespace}',
95+
clientID: '${account.clientId}',
9096
callbackOnLocationHash: true
9197
});
9298
@@ -139,13 +145,7 @@ The full code sample for both the SPA applications as well as the normal web app
139145
// Showing Login
140146
$('.btn-login').click(function (e) {
141147
e.preventDefault();
142-
lock.show({
143-
auth: {
144-
params: {
145-
scope: 'openid name picture'
146-
}
147-
}
148-
});
148+
lock.show();
149149
});
150150
151151
</script>

0 commit comments

Comments
 (0)