What's the strategy to implement single sign-on for two PHP websites?
There are two websites, more are probably coming. One is a simple PHP site and the other is Drupal. The objectives are:
- to have two user accounts created when a new user registered on any website
optionally:
-
开发者_StackOverflow
- when a user change a password on any website, the password is synced to another
Any suggestions? Thanks
You could use CAS. There is a drupal module and there is phpCAS. This should work fine but this is no php-only solution. drupal.org itself uses bakery for SSO.
First off you would need to make sure that both websites are able to connect to the same SQL database. If they have different domains you will need to choose one site to be the master gateway to login and checking if they are logged in.
this is Google's method which I think is great .... you can create your own API
working the same way
精彩评论