www.francisfish.com

Click Bookshop to see my novels. Buddhist, father of 2, Ruby on Rails programmer for money, and fiction writer.

    follow me on Twitter

    Rails authlogic: can't use OAuth and OpenID plugins together

    Published: 6:07 PM GMT, Wednesday, 22 July 2009

    I'm trying to use both openid and oauth with authlogic. Looks like I can't.

    The plugins both override the active record save method and call the block you associate with it in the controller (this is done so that it can go to the external website and come back without a double render - very clever stuff). Prob is *both* will call the block, so you'll get a double render. Can't work out how to only call the block once and have tried using global variables but don't like them because they aren't thread safe.

    I'm sure I can sort this out but it's taking too long, sigh, so on the shelf it goes.

    This is the problem with trying to make a site available to everyone, but I think OpenID loses over Twitter for my app.

    Usable fixes and suggestions welcome. I've tried @@variables in the controller but didn't work and don't like them anyway.

    To clarify some more:

    I'm trying to save a user with the handy "register with Twitter" button supplied by the OAuth plugin and when it tries to do the validation both the OAuth and OpenID plugins call their own versions of save. This calls the block twice. At the moment it's one or the other.


    Comments (0)

    Add Comment