Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Error 500, NoMethodError (undefined method `refresh_tokens' for nil:NilClass): #26

Closed
lgalabru opened this issue Nov 30, 2011 · 1 comment

Comments

@lgalabru
Copy link

Hello there,

I'm having an issue when trying to getting an access token from an iOS client (from an in-house SDK) with my rails-3.1.1 APIs.
The /authorize looks ok, and when I'm getting my authorization code and trying to post on /token, I'm experiencing some:
undefined method `refresh_tokens' for nil:NilClass (development mode).
It comes from tokens#create, and it looks like my env[Devise::Oauth2Providable::CLIENT_ENV_REF] is empty/nil.
I do have an ugly workaround, which consist in subclassing tokens_controller and overriding the method oauth2_current_client, authenticate_user! & cie and bypassing the calls on env[xxx].
Any idea?

Regards,

@wireframe
Copy link
Contributor

make sure that your iphone app has cookies disabled.

i'm reviewing a patch from issue #21 which may fix this as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants