[LRUG] Omniauth but require Devise login

Tommy Palmer hi at tommyp.org
Thu Aug 1 06:02:56 PDT 2013


I would generally put the authenticate_user filter in my Application Controller, then skip as needed. I'm not sure, but I'd guess that if you do this Omniauth would then need a current_user to process anything. 

--
Tommy Palmer
http://tommyp.org
@tommypalm


On Thursday, 1 August 2013 at 13:59, brendan murphy wrote:

> 
> We do something like that at enthuse.me (http://enthuse.me), for the providers that require Oauth, but for content gathering only, not sign in.
> 
> Keeping your AuthenticationController for Devise Oauth if fine, just provide some business logic that checks there is a current_user or redirect before building your Authentication requirement from the provider.
> 
> then just limit where the paths are provided.
> 
> Best
> 
> Brendan
> 
> 
> 
> 
> On 1 Aug 2013, at 13:00, Kevin Fullerton <lrug at kenwa-solutions.co.uk (mailto:lrug at kenwa-solutions.co.uk)> wrote:
> 
> > Hi,
> > 
> > Long-time lurker whose Google-fu appears to be weak ... I'm working on a new side-project with Rails4, I want users to be able to register using an e-mail+password which I've got Devise doing well, however I want them to then be able to link Facebook + Instagram accounts to their account - I can get this working, but wondering what the best way is to disallow access to the /auth/:provider routes if the user isn't currently logged-in?
> > 
> > Apologies if this is an easy one, I just can't work it out without resorting to monkey-patching the Omniauth route builder :(
> > 
> > Cheers!
> > 
> > --
> > 
> > Kevin Fullerton
> > _______________________________________________
> > Chat mailing list
> > Chat at lists.lrug.org (mailto:Chat at lists.lrug.org)
> > http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> > 
> 
> 
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org (mailto:Chat at lists.lrug.org)
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
> 
> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20130801/4694085e/attachment-0003.html>


More information about the Chat mailing list