git.iko.soy/typeable/oauth2-proxy
on master help sign in
Add URL fragment to sign-in form

This allows a seamless transition for applications that encode state in the fragment.

commitf74ad565999cdcc7f6652d75ad4d031351001114 authorChris Hundt <chris@judicata.com> dateMon 25 Jan 2016, 13:43 (11 years ago) parent10f47e3
1 file changed+10
templates.go+10
templates.go+10
@@ -129,6 +129,16 @@ func getTemplates() *template.Template {
129129 </form>
130130 </div>
131131 {{ end }}
132+ <script>
133+ if (window.location.hash) {
134+ (function() {
135+ var inputs = document.getElementsByName('rd');
136+ for (var i = 0; i < inputs.length; i++) {
137+ inputs[i].value += window.location.hash;
138+ }
139+ })();
140+ }
141+ </script>
132142 <footer>
133143 Secured with <a href="https://github.com/bitly/oauth2_proxy#oauth2_proxy">OAuth2 Proxy</a> version {{.Version}}
134144 </footer>