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
The react-oauth2-code-pkce library currently lacks some functionalities that are common in similar libraries like auth0-react, which affects developers transitioning between these libraries. To bridge this gap, I propose the following enhancements:
PostLogout Callback: A callback function that is triggered after the logout process completes.
Additional Parameters for logOut(): Allow passing additional parameters to the logOut() method, akin to the login() method.
LogoutInProgress State: A new state indicator to signify when a logout operation is in progress, enhancing UI responsiveness.
Basic Example
Here are some basic examples of how these features could be implemented:
PostLogout Callback Example:
constauthConfig: TAuthConfig={// ... //postLogout: ()=>{console.log("Logout completed!");// Additional cleanup actions can be performed here}};
Complexity: Introducing these features could increase the complexity of the library's API, potentially making it harder to maintain and understand.
Scope Creep: Each new feature could lead to requests for more similar features, potentially diverting focus from the core functionality of the library.
Performance: Adding more features, especially state management like logoutInProgress, might impact the performance if not implemented efficiently.
The text was updated successfully, but these errors were encountered:
Hi @kleysonfiretail
Thank you for the suggestions.
I think these are reasonable requests. Params to the login() is something I have though of doing for some time, just never heard anyone actually missing it.
PostLogoutCallback is also a nice feature. Easy enough to add, and fits well with the existing callbacks pattern.
Not sure how you would use "LogoutInProgress", as it is a synchronous function, with no state and redirect back and fourth involved. If you could give an example for when you would need this to help me understand, that would be great 馃檪
Summary
The
react-oauth2-code-pkce
library currently lacks some functionalities that are common in similar libraries likeauth0-react
, which affects developers transitioning between these libraries. To bridge this gap, I propose the following enhancements:Basic Example
Here are some basic examples of how these features could be implemented:
PostLogout Callback Example:
Additional Parameters for logOut() Example:
LogoutInProgress State Example:
Drawbacks
Complexity: Introducing these features could increase the complexity of the library's API, potentially making it harder to maintain and understand.
Scope Creep: Each new feature could lead to requests for more similar features, potentially diverting focus from the core functionality of the library.
Performance: Adding more features, especially state management like logoutInProgress, might impact the performance if not implemented efficiently.
The text was updated successfully, but these errors were encountered: