[LRUG] Omniauth but require Devise login

brendan murphy brendan at enthuse.me
Thu Aug 1 05:59:22 PDT 2013


We do something like that at 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> 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
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org




More information about the Chat mailing list