asgardeo / asgardeo-auth-react-sdk

To maintain the implementation of Asgardeo React authentication SDK
Apache License 2.0
40 stars 91 forks source link

Bring your own router: Remove `react-router-dom` dependency #230

Closed brionmario closed 5 months ago

brionmario commented 5 months ago

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:

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.

Additional context

N/A

brionmario commented 5 months ago

Fixed with https://github.com/asgardeo/asgardeo-auth-react-sdk/pull/214