Skip to content
This repository was archived by the owner on Jun 10, 2022. It is now read-only.

Commit 7d458ba

Browse files
authored
Merge pull request #4 from auth0/auth0-js-v9
[MERGE Dec 1st] Remove Lock and use Auth0.js v9.
2 parents ec47ff7 + 0d7df27 commit 7d458ba

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

views/index.pug

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
extends layout
22

33
block content
4-
script(src="https://cdn.auth0.com/js/lock/10.7.2/lock.min.js")
4+
script(src="https://cdn.auth0.com/js/auth0/9.0.0-beta.5/auth0.min.js")
55

66
h1= title
77
p Welcome to #{title}
88
br
99

1010
script.
11-
var lock = new Auth0Lock('#{env.AUTH0_CLIENT_ID}', '#{env.AUTH0_DOMAIN}', {
12-
auth: {
13-
redirectUrl: '#{env.AUTH0_CALLBACK_URL}',
14-
responseType: 'code',
15-
params: {
16-
scope: 'openid profile' // Learn about scopes: https://auth0.com/docs/scopes
17-
},
18-
closable: false,
19-
autofocus: true
20-
}
11+
var auth0 = new window.auth0.WebAuth({
12+
clientID: '#{env.AUTH0_CLIENT_ID}',
13+
domain: '#{env.AUTH0_DOMAIN}',
14+
scope: "openid profile", // Learn about scopes: https://auth0.com/docs/scopes
15+
responseType: "code",
16+
redirectUri: '#{env.AUTH0_CALLBACK_URL}'
2117
});
22-
lock.show();
18+
19+
auth0.authorize();

0 commit comments

Comments
 (0)