Skip to content

[BUG] LEAR Update - Business Dashboard shows "Session Expired" when the user just doesn't have access to the business #35669

Todo

Description

@mruff-aeq

When a logged in user opens the business dashboard for a business their account is not affiliated with, the api now returns 401 (new auth tightening, bcgov/lear#4975). The dashboard treats every 401 as an expired login and shows the "Session Expired" modal with a Log In button. The user is still logged in, so logging in again just brings the same modal back.

Expected: show the existing "Access Restricted" dialog (you don't have permission, go to your Business Registry Dashboard), and only show "Session Expired" when the token is actually expired.

Repro (test): log in with a BCSC account, open https://test.business-dashboard.bcregistry.gov.bc.ca/BC3000847?accountid=1121 (or any business that account doesn't own).

Notes: only visible in dev/test right now because the authV2Business flag is off in prod. Should be fixed before that flag is turned on in prod. Came from the Session Expired modal added in #27019 when a 401 could only mean expired token.

session_expired_unaffiliated_business.png

image.png

Activity

  1. added
    Entities Team
    on Nov 19, 2026
  2. mstanton1 commented on Dec 1, 2026

    @mstanton1
    Collaborator

    LEAR side of things enforce "403 error" on this type of error response.

    UI Ticket to be created to ensure proper error response is shown on the UI.

  3. changed the title [-][BUG] Business Dashboard shows "Session Expired" when the user just doesn't have access to the business[/-] [+][BUG] LEAR Update - Business Dashboard shows "Session Expired" when the user just doesn't have access to the business[/+] on Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Entities Team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions