Improved csrf protection for remote login

This commit is contained in:
Ozzie Isaacs
2021-10-03 09:58:45 +02:00
parent 52be2ad4a2
commit 1c15e10ac0
3 changed files with 40 additions and 4 deletions
+4 -3
View File
@@ -4,7 +4,7 @@
<h2 style="margin-top: 0">{{_('Magic Link - Authorise New Device')}}</h2>
<p>
{{_('On another device, login and visit:')}}
<h4><a id="verify_url" href="{{verify_url}}">{{verify_url}}</a></b>
<h4><a id="verify_url" data-token="{{token}}" href="{{verify_url}}">{{verify_url}}</a></b>
</h4>
<p>
{{_('Once verified, you will automatically be logged in on this device.')}}
@@ -16,7 +16,8 @@
{% endblock %}
{% block js %}
<script type="text/javascript">
<script src="{{ url_for('static', filename='js/remote_login.js') }}"></script>
<!--script type="text/javascript">
(function () {
// Poll the server to check if the user has authenticated
var t = setInterval(function () {
@@ -37,5 +38,5 @@
});
}, 5000);
})()
</script>
</script-->
{% endblock %}