summaryrefslogtreecommitdiffstats
path: root/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl
blob: d16a8414267460460b9fae41d5657f8debac3910 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[% IF Param('user_info_class').split(',').contains('BrowserID') %]
<script src="https://browserid.org/include.js" type="text/javascript"></script>

<script type="text/javascript">
function browserid_sign_in() {
    navigator.id.getVerifiedEmail(function(assertion) {
        if (assertion) {
            // This code will be invoked once the user has successfully
            // selected an email address they control to sign in with.
            var token = "[% issue_hash_token(['login']) FILTER html %]";
            window.location.href = "[% login_target FILTER none %]?token="
                + token + "&browserid_assertion=" + assertion;
        }
    });
}
</script>

<p>
Or, log in with BrowserID: 
<img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()">
</p>
[% END %]