Skip to content

Commit 2eb1601

Browse files
committed
Add auth.js
1 parent 18abdd0 commit 2eb1601

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

js/auth.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
$(document).ready(function() {
2-
var webAuth = new auth0.WebAuth({
3-
clientID: 'In43D8hfptI5B17Xo7XZX4aBkhfMuH56',
4-
domain: 'auth.coderic.org',
5-
audience: `https://coderic.eu.auth0.com/api/v2/`,
6-
scope: 'openid profile email',
7-
redirectUri: 'https://'+window.location.hostname+'/',
8-
responseType: 'token id_token'
9-
});
1+
var webAuth = new auth0.WebAuth({
2+
clientID: 'In43D8hfptI5B17Xo7XZX4aBkhfMuH56',
3+
domain: 'auth.coderic.org',
4+
audience: `https://coderic.eu.auth0.com/api/v2/`,
5+
scope: 'openid profile email',
6+
redirectUri: 'https://'+window.location.hostname+'/',
7+
responseType: 'token id_token'
8+
});
9+
10+
$(document).ready(function() {
1011
webAuth.checkSession(
1112
{
1213
audience: 'https://coderic.eu.auth0.com/api/v2/',
1314
scope: 'openid profile email',
14-
},
15+
},
1516
function(err, result) {
1617
console.dir(result);
1718
if (err || !result || !result.accessToken) {
@@ -26,8 +27,7 @@
2627
$(".guest").hide();
2728
$(".authenticated").show();
2829
}
29-
}
30-
);
30+
});
3131
});
3232

3333
logout = () => webAuth.logout({

0 commit comments

Comments
 (0)