kinde-oss / kinde-auth-pkce-js

Kinde vanilla JavaScript authentication for SPAs using PKCE flows. Can be used with Vue / Angular or any JS framework
https://kinde.com/docs/developer-tools/javascript-sdk/
MIT License
17 stars 11 forks source link

Feature request: Extract utils into a shared library #32

Open DaveOrDead opened 1 year ago

DaveOrDead commented 1 year ago

Prerequisites

What is the problem you’re trying to solve?

Many of the utility functions are common across all our JS based SDKs (vanilla JS, Next, Node, React) and there is unnecessary code duplication. These are helpers for:

What solution would you like to see?

A consolidated shared helper library that can be consumed by all our JS libraries

Additional information

No response

DaveOrDead commented 12 months ago

We now have a universal TS/JS based SDK which is designed to be consumed by both browsers and node runtime environments.

We should update this library to leverage it

atifcppprogrammer commented 7 months ago

Hey @DaveOrDead long time no see ! I would love to work on refactoring this using the TypeScript SDK, please create an issue for this so I can let loose.

DaveOrDead commented 7 months ago

Awesome stuff! You're welcome to use this issue to track it - I'll assign you to it

atifcppprogrammer commented 7 months ago

@DaveOrDead, there is one thing that has always bothered me about this SDK, is that there are no tests for the public interface i.e. src/createKindeClient.ts, prior to refactoring this using the @kinde-oss/kinde-typescript-sdk as a dependency I think it is better to have a robust test suite for this file, that establishes a clear specification of its behavior. This will ensure that post migration we don't have any regression. Thoughts ?

DaveOrDead commented 7 months ago

@atifcppprogrammer yep that makes sense, I've been meaning to bolster the coverage. The TS SDK would remove quite a lot of the logic I think as a lot of it lives there already, so possibly would end up writing a few tests for code that becomes redundant but that's probably fine.

atifcppprogrammer commented 1 month ago

Hi @DaveOrDead apologies for dragging my feet over this issue, was totally swamped with work / life :roll_eyes:. I'm still willing to take a crack at this and will have time this weekend. Just wanted to confirm that Kinde is still pursuing the current direction of making the TypeScript SDK a dependency for this SDK, and that this work is still needed.

DanielRivers commented 1 month ago

Can you hold off for the moment @atifcppprogrammer please, looking at something different internally atm.

cc: @DaveOrDead