Handle session token expiry
Open
@elias-ba is already working on this.
Since Apr 13, 2023.
- Dominant language
- Elixir
- Stars
- 296
- Forks
- 86
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 50
Description
When a session token expires, the app throws an error because the user isn't being passed into the authorize function. The user still gets redirected to the login page, but we should handle token expiry so that we don't keep getting these errors.
Sentry Issue: LIGHTNING-2V
FunctionClauseError: no function clause matching in Lightning.Policies.Users.authorize/3
File "lib/lightning/policies/users.ex", line 39, in Lightning.Policies.Users.authorize/3
File "lib/bodyguard.ex", line 28, in Bodyguard.permit/4
File "lib/lightning/policies/permissions.ex", line 6, in Lightning.Policies.Permissions.can/4
File "lib/lightning_web/live/audit_live/index.ex", line 13, in LightningWeb.AuditLive.Index.mount/3
File "lib/phoenix_live_view/utils.ex", line 348, in anonymous fn/6 in Phoenix.LiveView.Utils.maybe_call_live_view_mount!/5
...
(3 additional frame(s) were not displayed)
(FunctionClauseError no function clause matching in Lightning.Policies.Users.authorize/3)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.