RailsCasts Pro episodes are now free!

Learn more or hide this

Sameer S's Profile

GitHub User: siruguri

Site: http://www.dstrategies.org/

Comments by Sameer S


Oh, crap - I just realized that the default callback URL parameter is in fact redirect_uri - I made the mistake of specifying it as callback when I was playing around. My bad.


I thought I'd add these notes for future n00bs to consider

  • You're most probably going to use Devise as your authentication solution - in that case, you want to change the method for finding the current user to be current user rather than the User.find_by_ code that's in the Doorkeeper initializer by default.
  • The OAuth2 gem uses certain defaults to generate the authorization URI - one of them is to assume that your OAuth provide route is /oauth/authorize which it will be if you use the Doorkeeper defaults, and the other is to use the parameter callback for the callback URI. The latter won't work though because the Doorkeeper gem default is to expect the callback URI to be specified with the redirect_uri parameter instead. So change callback= to redirect_uri=