Is your suggestion related to an experience ? Please describe.
Currently (v4.0.4), the installation experience of the SDK is as follows.
npm install @asgardeo/auth-react react-router-dom
Installing the react-router-dom dependency is mandatory since the SDK has a SecureRoute component that allows defining protected routes in a React app.
This poses several issues:
DX is bad since an authentication SDK should not be opinionated about what routing library the application should use.
It's a maintenance overhead to the SDK maintainers since react-router major versions often have breaking changes.
Even if the SDK stay upto date, developers who are on older react router versions will not be able to use the SecureRoute component.
Maintaining different versioned components is not practical (SecureRouteV5, SecureRouteV4, etc)
Describe the improvement
Remove the react-router-dom dependency along with the SecureRoute and document code blocks in different routing flavours so that developers can easily use them and implement their own SecureRoute.
Is your suggestion related to an experience ? Please describe.
Currently (v4.0.4), the installation experience of the SDK is as follows.
Installing the
react-router-dom
dependency is mandatory since the SDK has a SecureRoute component that allows defining protected routes in a React app.This poses several issues:
SecureRoute
component.Describe the improvement
Remove the
react-router-dom
dependency along with theSecureRoute
and document code blocks in different routing flavours so that developers can easily use them and implement their ownSecureRoute
.Additional context
N/A