Wednesday, April 13, 2011

Authentication combination OpenID & Facebook

Is it possible to use a combination of authentication systems in a web app?

I want to use OpenId, however I think my potential customers are actually more likely to have a Facebook ID.

Therefore I wonder if it is possible to offer both types of authentication?

From stackoverflow
  • For nearly every language there should be a Framework! You can chain/wrap the functionality of that frameworks to statisfy your needs!

    In pseudocode:

    if(IsUserValidViaOpenId() || IsUserValidByOwnAuthDB()) ...  user auth successful
    

    If you use java, Acegi/Spring Security might be the best way (Security which isn't inversive - via AOP). There you can use openID and define an own second validator for yor own userdb!

  • Facebook has joined the OpenID foundation, so perhaps they'll be implementing OpenID soon (in which case it may be better to just use OpenID).

  • Something like this in your form processing logic:

    def authenticate(form_info):
        url = form_info['url']
        if (is_facebook_url(url)):
            return perform_facebook_authentication(form_info)
        else:
            return perform_open_id_authentication(form_info)
    
  • You want RPX. It abstracts the whole mess of OpenID away from both you and your visitors. It also lets them authenticate with Facebook or MySpace in addition to the OpenID providers.

    It provides a login interface very similar to what you see right here on Stack Overflow.

    Chris Lawlor : That's pretty cool - I might try it out in my next project. Thanks!
    Jason S : neat! looks like a possible winner...
    troethom : And it also makes you completely depending on a single external source for all your user authentication. Please read the arguments at http://blog.nerdbank.net/2009/01/why-using-rpxnow-is-bad-idea.html before deciding whether to use it.

0 comments:

Post a Comment