Closed kleysonfiretail closed 5 months ago
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 :slightly_smiling_face:
Closing this in favor of the other 2 issues
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.