Open yathindrak opened 2 years ago
Hey @yathindrak @NipuniBhagya , i'd like to work on this issue, can i be assigned to it?
Hi @Yash-sudo-web , thanks for offering to help. Replacing axios with fetch will need a significant effort as some core SDK functionalities heavily rely on axios features. I have updated the issue description to include those information as well. Please let us know if you are still willing to take on the challenge.
@pavinduLakshan , i have also commented on Issus #251, can that be assigned to me first? i think that is less complex and would help out in understanding the codebase better
Describe the improvement
Using fetch over axios will reduce the bundle size of the sdk. This would improve the cold starts in serverless environments as well.
Here, we may consider providing browser polyfills as well.
Additional context
Even though this issue is opened in the React SDK, the required changes need to be implemented in the SPA-SDK. We heavily rely on axios interceptors for SDK hooks[1], so it's necessary to explore whether an alternative approach using fetch can be implemented.
[1] https://github.com/asgardeo/asgardeo-auth-react-sdk/blob/main/API.md#on