Skip to content

Commit 37b5a5f

Browse files
committed
Add auth.js
1 parent 2eb1601 commit 37b5a5f

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

_layouts/layout_en.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
</ol>
5353
<ol class="inline-flex md:space-x-2 rtl:space-x-reverse hidden guest">
5454
<li>
55-
<a class="inline-flex items-center text-sm font-medium hover:text-orange-600"
56-
title="Log in" onclick="webAuth.authorize(); return false;">
55+
<a class="inline-flex items-center text-sm font-medium hover:text-orange-600" href="/"
56+
title="Log in" onclick="login()">
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 />

js/auth.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ $(document).ready(function() {
3030
});
3131
});
3232

33+
login = () => webAuth.authorize({
34+
connection: 'saml',
35+
connection_scope: 'openid profile email',
36+
prompt: 'none',
37+
});
3338
logout = () => webAuth.logout({
3439
returnTo: 'https://' +window.location.hostname + '/'
3540
});

0 commit comments

Comments
 (0)