File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929 responseType : 'token id_token'
3030 } ) ;
3131
32-
33- function login ( ) {
34- webAuth . authorize ( ) ;
35- }
32+ logout = ( ) => webAuth . logout ( {
33+ returnTo : 'https://' + window . location . hostname + '/'
34+ } ) ;
3635
3736 $ ( document ) . ready ( function ( ) {
3837
39- $ ( ".login-btn" ) . click ( ( ) => {
40- webAuth . authorize ( ) ;
41- return false ;
42- } ) ;
43- $ ( ".logout-btn" ) . click ( ( ) => webAuth . logout ( {
44- returnTo : 'https://' + window . location . hostname + '/'
45- } ) ) ;
46-
38+
4739 webAuth . checkSession (
4840 {
4941 audience : `https://coderic.eu.auth0.com/api/v2/` ,
Original file line number Diff line number Diff line change 5252 </ ol >
5353 < ol class ="inline-flex md:space-x-2 rtl:space-x-reverse guest ">
5454 < li >
55- < a class ="btn-login inline-flex items-center text-sm font-medium hover:text-orange-600 "
56- title ="Log in ">
55+ < a class ="inline-flex items-center text-sm font-medium hover:text-orange-600 "
56+ title ="Log in " onclick =" webAuth.authorize(); return false; " >
5757 < svg class ="w-3.5 h-3.5 ms-2 mr-2 " xmlns ="http://www.w3.org/2000/svg " viewBox ="0 0 32 32 "
5858 fill ="currentColor ">
5959 < defs />
9999 </ a >
100100 </ li >
101101 < li >
102- < button type ="submit " class ="inline-flex logout-btn items-center text-sm font-medium hover:text-orange-600 ">
102+ < button type ="submit " onclick =" logout() " class ="inline-flex items-center text-sm font-medium hover:text-orange-600 ">
103103 < svg xmlns ="http://www.w3.org/2000/svg " fill ="none " viewBox ="0 0 24 24 " stroke-width ="1.5 "
104104 stroke ="currentColor " class ="w-3.5 h-3.5 ms-2 mr-2 ">
105105 < path stroke-linecap ="round " stroke-linejoin ="round "
You can’t perform that action at this time.
0 commit comments