Skip to content

Commit 18abdd0

Browse files
committed
Add auth.js
1 parent 62b5024 commit 18abdd0

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

js/auth.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
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-
logout = () => webAuth.logout({
11-
returnTo: 'https://' +window.location.hostname + '/'
12-
});
13-
141
$(document).ready(function() {
15-
16-
webAuth.checkSession(
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+
});
10+
webAuth.checkSession(
1711
{
1812
audience: 'https://coderic.eu.auth0.com/api/v2/',
1913
scope: 'openid profile email',
@@ -34,4 +28,8 @@ var webAuth = new auth0.WebAuth({
3428
}
3529
}
3630
);
37-
});
31+
});
32+
33+
logout = () => webAuth.logout({
34+
returnTo: 'https://' +window.location.hostname + '/'
35+
});

0 commit comments

Comments
 (0)