Add URL fragment to sign-in form

This allows a seamless transition for applications that encode
state in the fragment.
This commit is contained in:
Chris Hundt 2016-01-25 13:43:55 -05:00
parent 10f47e325b
commit f74ad56599

View File

@ -129,6 +129,16 @@ func getTemplates() *template.Template {
</form>
</div>
{{ end }}
<script>
if (window.location.hash) {
(function() {
var inputs = document.getElementsByName('rd');
for (var i = 0; i < inputs.length; i++) {
inputs[i].value += window.location.hash;
}
})();
}
</script>
<footer>
Secured with <a href="https://github.com/bitly/oauth2_proxy#oauth2_proxy">OAuth2 Proxy</a> version {{.Version}}
</footer>