增加了讨论区的 SSO 登录
This commit is contained in:
@@ -5,17 +5,13 @@
|
||||
{% block body %}
|
||||
<div class="container main">
|
||||
<div class="text-center">
|
||||
{% if request.user.is_authenticated %}
|
||||
<p>3秒钟后将跳转到<span id="link">{{ callback }}</span></p>
|
||||
<p>3秒钟后将使用账号{{ request.user.username }}登录<span id="link">{{ callback }}</span></p>
|
||||
<button class="btn btn-warning" onclick="location.href='/'">取消登录</button>
|
||||
<button class="btn btn-success" onclick="location.href='/login/'">更换账号</button>
|
||||
<script>setTimeout(function(){
|
||||
window.location.href = "{{ callback }}?token={{ token }}"},
|
||||
window.location.href = "{{ redirect_url }}"},
|
||||
3000);
|
||||
</script>
|
||||
{% else %}
|
||||
<script>window.location.href = "/login/";</script>
|
||||
{% endif %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user