Skip to content

Commit 9a9be68

Browse files
authored
Bug: Fix page blinking after login (Chainlit#2640)
When using the `header_auth_callback ` and another auth callback for login, the page starts to "blink" as soon as a user logged in. This is because `header_auth_callback ` always gets called when routing to the root. Fix: Now when a user is already authenticated, the `header_auth_callback `won't be called Issue: Chainlit#2599
1 parent 010ac8f commit 9a9be68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

frontend/src/pages/Login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export default function Login() {
7373
if (!config.requireLogin) {
7474
navigate('/');
7575
}
76-
if (config.headerAuth) {
76+
if (config.headerAuth && !user) {
7777
handleHeaderAuth();
7878
}
7979
if (user) {

0 commit comments

Comments
 (0)