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?

+1  A: 

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!

Martin K.
+3  A: 

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).

Jason S

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)
        return perform_open_id_authentication(form_info)
Chris Lawlor
+2  A: 

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.

Jim Puls
That's pretty cool - I might try it out in my next project. Thanks!
Chris Lawlor
neat! looks like a possible winner...
Jason S
And it also makes you completely depending on a single external source for all your user authentication. Please read the arguments at before deciding whether to use it.