On Friday, March 2, 2012 7:44:46 AM UTC-8, Dan Croak wrote:
> Misha,
> Here is what I did the last time I used Clearance with Omniauth (Facebook
> only):
> https://gist.github.com/88558b3ae6c5bc41cdae
> Does that help?
> Dan
> On Fri, Mar 2, 2012 at 12:03 AM, Misha Manulis <mich...@manulis.com>
> wrote:
> > Hi Dan,
> > I was following the example from Ryan Bates railscast for Omniauth,
> parts 1
> > and 2. He uses Devise for his example and I was adapting it to
> Clearance.
> > In his example, he creates an Authorizations controller. When the
> provider
> > calls the callback URL, there's a route to catch it and send it to the
> > create action in Authorizations controller.
> > The create action does a bunch of checks about whether or not the user
> needs
> > to be registered and at the end, signs him/her in.
> > Devise uses sign_in_and_redirect call and in Clearance I found sign_in
> > function which I assumed does the same as what Devise implements, minus
> the
> > redirect.
> > You can see my implementation of the create action
> > here https://gist.github.com/1955811
> > After the redirect current_user is empty.
> > What am I doing wrong?
> > Thank you
> > Omniauth Railscasts:
> > http://railscasts.com/episodes/235-omniauth-part-1
> > http://railscasts.com/episodes/236-omniauth-part-2
> > On Tuesday, February 28, 2012 10:12:53 AM UTC-8, Dan Croak wrote:
> >> Hi Misha,
> >> Can you share more of your code? Maybe using http://gist.github.com?
> >> Clearance should be able to play nicely with Omniauth. Read this file
> >> to get a sense of how Clearance interacts with sessions:
> https://github.com/thoughtbot/clearance/blob/master/lib/clearance/aut...
> >> Dan
> >> On Mon, Feb 27, 2012 at 8:26 PM, Misha Manulis <mich...@manulis.com>
> >> wrote:
> >> > I'm working on integrating Clearance with Omniauth and I'm struggling
> >> > trying
> >> > to figure out how to sign a user in, after (s)he has signed in via
> >> > Omniauth.
> >> > I've tried using sign_in function and passing an instance of the user,
> >> > but
> >> > after I redirect_to root_path current_user is not set.
> >> > I've tried setting the current user directly, but that's not helping
> >> > either.
> >> > Looking through the code, I see a sign_in method, but I'm not sure how
> >> > to
> >> > get access to the sessions controller to call it. The test helpers
> >> > refer to
> >> > @controller instance, but which controller?
> >> > What's the correct way of integrating Clearance with Omniauth? Is
> there
> >> > a
> >> > tutorial/doc on how to do this?
> >> > Thank you,
> >> > Misha
> >> > --
> >> > thoughtbot also wrote a playbook on running a web business:
> >> > http://playbook.thoughtbot.com
> >> > We regularly write about Rails development at our blog:
> >> > http://robots.thoughtbot.com
> >> > To unsubscribe from this group, send email to
> >> > thoughtbot-clearance+unsubscribe@googlegroups.com
> > On Tuesday, February 28, 2012 10:12:53 AM UTC-8, Dan Croak wrote:
> >> Hi Misha,
> >> Can you share more of your code? Maybe using http://gist.github.com?
> >> Clearance should be able to play nicely with Omniauth. Read this file
> >> to get a sense of how Clearance interacts with sessions:
> https://github.com/thoughtbot/clearance/blob/master/lib/clearance/aut...
> >> Dan
> >> On Mon, Feb 27, 2012 at 8:26 PM, Misha Manulis <mich...@manulis.com>
> >> wrote:
> >> > I'm working on integrating Clearance with Omniauth and I'm struggling
> >> > trying
> >> > to figure out how to sign a user in, after (s)he has signed in via
> >> > Omniauth.
> >> > I've tried using sign_in function and passing an instance of the user,
> >> > but
> >> > after I redirect_to root_path current_user is not set.
> >> > I've tried setting the current user directly, but that's not helping
> >> > either.
> >> > Looking through the code, I see a sign_in method, but I'm not sure how
> >> > to
> >> > get access to the sessions controller to call it. The test helpers
> >> > refer to
> >> > @controller instance, but which controller?
> >> > What's the correct way of integrating Clearance with Omniauth? Is
> there
> >> > a
> >> > tutorial/doc on how to do this?
> >> > Thank you,
> >> > Misha
> >> > --
> >> > thoughtbot also wrote a playbook on running a web business:
> >> > http://playbook.thoughtbot.com
> >> > We regularly write about Rails development at our blog:
> >> > http://robots.thoughtbot.com
> >> > To unsubscribe from this group, send email to
> >> > thoughtbot-clearance+unsubscribe@googlegroups.com
> > On Tuesday, February 28, 2012 10:12:53 AM UTC-8, Dan Croak wrote:
> >> Hi Misha,
> >> Can you share more of your code? Maybe using http://gist.github.com?
> >> Clearance should be able to play nicely with Omniauth. Read this file
> >> to get a sense of how Clearance interacts with sessions:
> https://github.com/thoughtbot/clearance/blob/master/lib/clearance/aut...
> >> Dan
> >> On Mon, Feb 27, 2012 at 8:26 PM, Misha Manulis <mich...@manulis.com>
> >> wrote:
> >> > I'm working on integrating Clearance with Omniauth and I'm struggling
> >> > trying
> >> > to figure out how to sign a user in, after (s)he has signed in via
> >> > Omniauth.
> >> > I've tried using sign_in function and passing an instance of the user,
> >> > but
> >> > after I redirect_to root_path current_user is not set.
> >> > I've tried setting the current user directly, but that's not helping
> >> > either.
> >> > Looking through the code, I see a sign_in method, but I'm not sure how
> >> > to
> >> > get access to the sessions controller to call it. The test helpers
> >> > refer to
> >> > @controller instance, but which controller?
> >> > What's the correct way of integrating Clearance with Omniauth? Is
> there
> >> > a
> >> > tutorial/doc on how to do this?
> >> > Thank you,
> >> > Misha
> >> > --
> >> > thoughtbot also wrote a playbook on running a web business:
> >> > http://playbook.thoughtbot.com
> >> > We regularly write about Rails development at our blog:
> >> > http://robots.thoughtbot.com
> >> > To unsubscribe from this group, send email to
> >> > thoughtbot-clearance+unsubscribe@googlegroups.com
> > --
> > thoughtbot also wrote a playbook on running a web business:
> > http://playbook.thoughtbot.com
> > We regularly write about Rails development at our blog:
> > http://robots.thoughtbot.com
> > To unsubscribe from this group, send email to
> > thoughtbot-clearance+unsubscribe@googlegroups.com