You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-login via referrer and server-side never triggers #237
should_auto_login() runs on init and checks is_front_page(), which is always false before the main query runs. The server-side auto-login therefore never triggers. Moving the check to template_redirect should fix this.
Typo in add_auto_login_script(): document.referer.indexOf(...) should be document.referrer.indexOf(...). It now throws a TypeError, so the referrer check never runs.
Result: visitors coming from portal.bcc.no / brunstad.org are never logged in automatically.
Both bugs are addressed in #238. Thanks for the clear report.
document.referer typo: fixed. The script also ignores links within the site now. Without that, on a site whose own domain starts with bcc, a logged-out visitor who clicks Home from another page would be sent to log in.
should_auto_login() on init: confirmed. is_front_page() is false there, so it has never fired since April 2023. Make auto-login from BCC referrers work again #238 removes it instead of moving it to template_redirect. Moved, it would have no once-per-session guard (anyone with the wp_has_logged_in cookie would be sent to login on every front-page visit). It would also match bcc anywhere in the referrer's host, and it would only run when the page cache misses. With the typo fixed, the front-page script covers the same cases, including on cached pages.
Visitors coming from portal.bcc.no, brunstad.org or a host starting with bcc will be logged in automatically again once #238 is merged and a new bcc-login version is released.
The silent sign-in on any page from #236 is tracked separately.
Activity
cs1m0n commentedon Nov 11, 2026
Both bugs are addressed in #238. Thanks for the clear report.
document.referertypo: fixed. The script also ignores links within the site now. Without that, on a site whose own domain starts withbcc, a logged-out visitor who clicks Home from another page would be sent to log in.should_auto_login()oninit: confirmed.is_front_page()is false there, so it has never fired since April 2023. Make auto-login from BCC referrers work again #238 removes it instead of moving it totemplate_redirect. Moved, it would have no once-per-session guard (anyone with thewp_has_logged_incookie would be sent to login on every front-page visit). It would also matchbccanywhere in the referrer's host, and it would only run when the page cache misses. With the typo fixed, the front-page script covers the same cases, including on cached pages.Visitors coming from portal.bcc.no, brunstad.org or a host starting with
bccwill be logged in automatically again once #238 is merged and a new bcc-login version is released.The silent sign-in on any page from #236 is tracked separately.