Skip to content
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

Guards that trigger again on stream event #218

Closed
lukepighetti opened this issue Feb 11, 2021 · 0 comments
Closed

Guards that trigger again on stream event #218

lukepighetti opened this issue Feb 11, 2021 · 0 comments
Labels
enhancement Suggested feature or enhancement to the library. Nav 2.0 Rewrite

Comments

@lukepighetti
Copy link
Owner

lukepighetti commented Feb 11, 2021

Issue inspired by #213 (reply in thread)

Right now FluroGuard triggers when the route is pushed. But in the case of an authentication guard, who may have logged in status stream events, it would be ideal to have this guard run again when the auth state changes, not just on push checks.

Perhaps we could have FluroGuard and FluroGuard.stream?

My concern is that this will create UX anti-patterns. If an auth token expires, it should be refreshed. If a user explicitly logs out, a navigation route change should be dispatched at that time. Neither of those imply a stream triggered guard. But at the same time, there are likely use cases that I can't identify at this time. Perhaps the question is how to organize route permissions, route alternatives, and when those are resolved.

@lukepighetti lukepighetti added the enhancement Suggested feature or enhancement to the library. label Feb 11, 2021
@lukepighetti lukepighetti added this to the 2.0 milestone Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggested feature or enhancement to the library. Nav 2.0 Rewrite
Projects
None yet
Development

No branches or pull requests

1 participant