-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find a prettier fix for loading pages before getting actor #110
Comments
joepio
added a commit
that referenced
this issue
Nov 16, 2021
I currently went for re-fetching all unauthorized resources in the store when |
joepio
added a commit
that referenced
this issue
Nov 21, 2021
joepio
added a commit
that referenced
this issue
Nov 21, 2021
joepio
added a commit
that referenced
this issue
Nov 21, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm working on authentication #108 and noticed an annoyance. When I refresh the page, the first request will be sent as PublicAgent (no agent), and will therefore return a 401 if the resource requires signing in. However, the user will be signed in automatically a fraction later. This would result in the user being signed in, yet staring at an
unauthorized
page. He could press the retry button, of course, but that's suboptimal...So I added some logic in the
useResource
hook, which keeps track of the current agent. If the agent changes, re-try fetching the resource. It works pretty well, but it adds quite a bit of logic, and possibly makes performance worse.I'd like to find a better solution to this.
The text was updated successfully, but these errors were encountered: