I'm creating a website .NET, which will provide specific service for its users. Lets call it service1.com. In future, there will be service2.com and they will share database. I also want to make a user friendly authentication by providing login with Google, Facebook, Twitter + custom signup in case users do not have existing with Google, etc. so they can sign up. I will be using DotNetOpenAuth library. So scenario is in a way similar to SO.
Now there are immediate problems with Google: it offers different claimed identifier for different realm - that means I can't use it as ID for users, but have to add Email into the picture to resolve users (like SO is doing).
Besides that it means I have to support Facebook Connect, Twitter and every additional login option on every service site.
So I came up with idea of OpenID proxy:
- I create OpenID provider openid.service.com with its own separate database
- service1.com and service2.com are its relying parties and share their own database
- openid.service.com can authenticate users in various different ways:
- new account with openid.service.com (basic sign up like SO)
- OpenID (Gmail, Yahoo,...)
- Facebook Connect
- ...
- login options and sign up forms will be displayed in iframe on every service website (like SO signup is)
- once openid.service.com authenticates user by any of options it provides claimed identifier to relying parties callback
So final result would look something like this:
PROS:
- services can use claimed identifier supplied from openid.service.com to identify which user is logging in
- services can be simply added to desired domains
- adding more login options is trivial since openid.service.com handles it
- Google claimed identifiers do not change because openid.service.com handles authentication
CONS:
- chain of authentication is longer (services do not authenticate directly with Google, etc.)
- ???
Is this a decent way to implement such a system and are there additional drawbacks to this?