-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unauthorized - after choosing plan + stripe payment #189
Comments
@prometheus88 I have the same problem in production. I development env everything works good. Did you find solution for this problem? |
@MiselAdemi Hey! No, couldn't fix it. I've contacted one of the makers of koudoku and asked if they could check this issue out, but they haven't replied on here since then. I think the problem has something to do with devise and the current_user definition, but i have no idea what exactly. There are also some other gems out there that can do the job (one of them is Payola but honestly, integrating it manually wasn't that hard. Hope this helps! Greetings! |
@prometheus88 - Did they reply? |
I never had this issue until now, seemingly out of no where, and there's hundreds of users now getting 'Unauthorized' once they create a subscription, or want to edit. Would love if this ticket was looked at! |
@prometheus88 @ACPK I'm sorry we weren't more responsive to this issue report last year. @gwalshington I'm in regular contact with lots of developers who are using Koudoku in production applications at scale and haven't heard any rumblings about this issue beyond what has been reported above (and maybe on other issues if there are any submitted). There haven't been any recent updates either, so it leads me to believe that something else might have changed in your applications configuration, permissions (maybe CanCanCan abilities), or some other bug that's causing the request type to change or something else that has caused this to present itself in your application. However, it's difficult to be completely sure without being able to dig into an application's code. I believe the best help we can offer is to hop on a pair programming call via https://tuple.app (I can provide a guest account) and work through the issue together on your machine. If you're interested, please email me at my first name at the domain of https://bullettrain.co and we can discuss rates and availability. |
I don't use cancancan. There are other people above reporting the same issue. I'd rather rebuild with stripe than pay you to debug your own gem. |
@gwalshington OK! No problem at all! I was just trying to be helpful. Alternatively (and I only suggest this because Koudoku seems to have been working well for you until this point) you could also just bust open the gem source yourself and try to debug the error being thrown that way. If you do figure this out, please let us know what the issue was so we can close this issue! |
So when i choose a plan as a user in my project, stripe registers it and the new subscription is visible in the stripe dashboard. This seem to be working just fine.
However, when i try to edit the plan as the user inside my project (via
<%= link_to "Check profile", koudoku.owner_subscriptions_path(@user) %>
), i always get the unauthorized page.Association between subscription & user is working, in rails c:
Subscription.last:
=> #<Subscription id: 5, stripe_id: "cus_not_important, plan_id: 1, last_four: "4242", coupon_id: nil, card_type: "undefined", current_price: 20.0, user_id: 6, created_at: "2018-03-10 10:20:20", updated_at: "2018-03-10 10:20:20">
User.last:
=> #<User id: 6, email: "[email protected]", created_at: "2018-03-10 10:19:32", updated_at: "2018-03-10 10:19:33", name: "Test8", provider: nil, uid: nil, image: nil, description: nil, plan_id: nil>
So this seems to be working just fine.
Im using devise and when i installed koudoku i used:
rails g koudoku:install user
Inside Koudoku.rb:
Any ideas whats going on?
//EDIT:
When i add
to the unauthorized.html.erb file, the owner names is displayed correctly. If this may help.
The text was updated successfully, but these errors were encountered: