summaryrefslogtreecommitdiffstats
path: root/extensions/BrowserID/template/en/default/hook/account/auth
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-04-04 19:27:58 +0200
committerDave Lawrence <dlawrence@mozilla.com>2012-04-04 19:27:58 +0200
commit672bb2b2765078f8ccb9058180f27816bc60c4e3 (patch)
treea43a63b756c5fdce3e612b23fd1907e7e2082236 /extensions/BrowserID/template/en/default/hook/account/auth
parent49495810ea07c10504c894fbf979568af7363f14 (diff)
downloadbugzilla-672bb2b2765078f8ccb9058180f27816bc60c4e3.tar.gz
bugzilla-672bb2b2765078f8ccb9058180f27816bc60c4e3.tar.xz
merged with bugzilla/extensions/browserid
Diffstat (limited to 'extensions/BrowserID/template/en/default/hook/account/auth')
-rw-r--r--extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl9
-rw-r--r--extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl9
2 files changed, 8 insertions, 10 deletions
diff --git a/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl b/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl
index 4d8d8d3f0..590efdfb3 100644
--- a/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl
+++ b/extensions/BrowserID/template/en/default/hook/account/auth/login-additional_methods.html.tmpl
@@ -7,10 +7,9 @@ function browserid_sign_in() {
if (assertion) {
// This code will be invoked once the user has successfully
// selected an email address they control to sign in with.
- window.location.href = "[% target FILTER none %]index.cgi?browserid_assertion=" + assertion;
- } else {
- // something went wrong! the user isn't logged in.
- alert("Oh no! Something went wrong...");
+ var token = "[% issue_hash_token(['login']) FILTER html %]";
+ window.location.href = "[% login_target FILTER none %]?token="
+ + token + "&browserid_assertion=" + assertion;
}
});
}
@@ -20,4 +19,4 @@ function browserid_sign_in() {
Or, you could login using BrowserID:
<img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()">
</p>
-[% END %] \ No newline at end of file
+[% END %]
diff --git a/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl b/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl
index 12bff015b..9871d585d 100644
--- a/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl
+++ b/extensions/BrowserID/template/en/default/hook/account/auth/login-small-additional_methods.html.tmpl
@@ -7,14 +7,13 @@ function browserid_sign_in() {
if (assertion) {
// This code will be invoked once the user has successfully
// selected an email address they control to sign in with.
- window.location.href = "[% login_target FILTER none %]?browserid_assertion=" + assertion;
- } else {
- // something went wrong! the user isn't logged in.
- alert("Oh no! Something went wrong...");
+ var token = "[% issue_hash_token(['login']) FILTER html %]";
+ window.location.href = "[% login_target FILTER none %]?token="
+ + token + "&browserid_assertion=" + assertion;
}
});
}
</script>
<img src="extensions/BrowserID/web/sign_in_orange.png" onclick="browserid_sign_in()" style="margin-bottom: -8px"> or
-[% END %] \ No newline at end of file
+[% END %]