Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Authenticating oauth but not interactive #120

Open
ephracis opened this Issue · 0 comments

1 participant

@ephracis

I have a controller where I want show and index to be accessible for everyone, but the rest should require authentication. However, I want to know if the user is logged in when they access show or index, so I can show personalized stuff for those who are authenticated.

I did this:

oauthenticate :except => [:show, :index]

This works fine for interactive stuff (using my browser). But when I try to access the show or index pages via an authenticated app using OAuth I don't get current_user set. current_token is set however but I would prefer it if current_user is set as well (to current_token.user).

I noticed that current_user does get set if I require oauthenticate, but when I don't then current_user is nil.

What am I doing wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.