You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Per #5178, disableNotification notification parameter was added to useCheckAuth and useLogoutIfAccessDenied functions; however, disableNotification can only be used with custom resources that use these functions. Resources that standard resource component (e.g. <Resource name="posts" list={PostList} />) will still trigger notification
Describe the solution you'd like
I would like to be able to pass this option to the entire react application so that I can disable authentication requirement so i can suppress Not authenticated message globally in the application
Describe alternatives you've considered
None
Additional context
N/A
The text was updated successfully, but these errors were encountered:
The problem is that #5255 wasn't a good fix for the #5178 problem. Adding an arguments to the hooks moves the problem up, as you noticed, and requires further modifications.
The right fix is to modify useCheckAuth in case of rejected Promise in authProvider.checkAuth(). useCheckAuth should check if the error contains a disableNotification property, and avoid dispatching the notification in that case. That would allow developers to hide the notification for the entire application by modifying their authProvider.
Is your feature request related to a problem? Please describe.
Per #5178, disableNotification notification parameter was added to
useCheckAuth
anduseLogoutIfAccessDenied
functions; however,disableNotification
can only be used with custom resources that use these functions. Resources that standard resource component (e.g.<Resource name="posts" list={PostList} />
) will still trigger notificationDescribe the solution you'd like
I would like to be able to pass this option to the entire react application so that I can disable authentication requirement so i can suppress
Not authenticated
message globally in the applicationDescribe alternatives you've considered
None
Additional context
N/A
The text was updated successfully, but these errors were encountered: