I need to implement 403 Forbidden page in web flutter application without redirecting to some /forbidden
path but leaving on the page which is forbidden. It it possible?
I need to implement 403 Forbidden page in web flutter application without redirecting to some /forbidden
path but leaving on the page which is forbidden. It it possible?
1 Answer
Reset to default 0On the root of the application add a stream listener.
From the redirect function of go router add a future callback for the forbidden page based on business logic.
In the future callback add an event to the stream sink. Add a delay before adding the event to the sink.
The listener can be used to display the Forbidden Dialog/ Widget.
Not the best approch. but will work. Redirecting to forbidden still is the best way