Skip to content

Commit e2514da

Browse files
committed
Improve demo to print cause of Message invalidation if debug is enabled
1 parent 9ffb241 commit e2514da

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

demo1/index.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@
7777

7878
if (!empty($errors)) {
7979
echo '<p>' . implode(', ', $errors) . '</p>';
80+
if ($auth->getSettings()->isDebugActive()) {
81+
echo '<p>'.$auth->getLastErrorReason().'</p>';
82+
}
8083
}
8184

8285
if (!$auth->isAuthenticated()) {
@@ -108,6 +111,9 @@
108111
echo '<p>Sucessfully logged out</p>';
109112
} else {
110113
echo '<p>' . implode(', ', $errors) . '</p>';
114+
if ($auth->getSettings()->isDebugActive()) {
115+
echo '<p>'.$auth->getLastErrorReason().'</p>';
116+
}
111117
}
112118
}
113119

0 commit comments

Comments
 (0)