clerk / clerk-sdk-ruby

Access the Clerk Backend API from Ruby
MIT License
24 stars 10 forks source link

Clerk messing up post requests #64

Open sudhanshug16 opened 5 months ago

sudhanshug16 commented 5 months ago

We have a Rails app with clerk setup for our admin dashboard which uses ActiveAdmin. When we submit an update/create form, sometimes (~25%) the form data is lost and the request goes to the GET endpoint instead of the POST endpoint. This is not related to ActiveAdmin because we recently added Blazer, which is unaffected by ActiveAdmin and we are seeing the same behavior.

On a side note, the design of this library is very odd. Any chance we can get it to resemble devise? which is pretty much the standard.

dimkl commented 5 months ago

Hello @sudhanshug16 Could you provide a minimal reproduction repo with the described issue? This would help us identify that the issue is related to the clerk-sdk-ruby, provide a fix and assert that it resolves your issue sooner.

On a side note, the design of this library is very odd. Any chance we can get it to resemble devise? which is pretty much the standard.

That's a nice suggestion! Could you open a separate issue for this to investigate it and provide you with a response?

sudhanshug16 commented 5 months ago

Here is a minimal reproducible example: https://github.com/sudhanshug16/clerk-sdk-bug. The issues arise when we add c.middleware_cache_store, especially when the middleware redirects to the sign in url for an instance (presumably to get a new token?) and loses the POST data.

sudhanshug16 commented 5 months ago

any updates? been a week

dimkl commented 4 months ago

@sudhanshug16 sorry but i didn't have the time to check it yet. I will add a reminder to try check it out by the end of the week. Edit: I am not yet available to take a look at this. I will ping you when i managed to find some time.