Skip to content

Commit 21b6f9d

Browse files
committed
Ref #30568: prevent issues with back button and openid
1 parent 75b1b1d commit 21b6f9d

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

src/main/resources/templates/auth-error.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
<head lang="en">
2929
<title th:text="${title}"></title>
3030
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
31+
<script type="text/javascript" th:inline="javascript">
32+
history.forward();
33+
</script>
3134
<link rel="stylesheet" media="screen" th:href="@{${bootstrapCss}}" />
3235
<link rel="stylesheet" media="screen" th:href="@{/css/login.css}"/>
3336
<script th:src="@{${jqueryJs}}"></script>

src/main/resources/templates/auth-success.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
<title th:text="${title}"></title>
2828
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
2929
<script type="text/javascript" th:inline="javascript">
30+
history.forward();
3031
history.pushState({}, "", new URL(location));
32+
history.pushState({}, "", new URL([[${url}]]));
3133
window.location.href = [[${url}]];
3234
</script>
3335
</head>

0 commit comments

Comments
 (0)