How to make a login like Google's for multiple services?

Discussion in 'PHP' started by AllWhatsRock, Jun 15, 2011.

  1. #1
    If I had a website with multiple services/applications that require a login on it (like an answers portal, a forum and a general social network etc.), how could I create a login form that logs into all of those things? If you don't understand, what I mean is if you log into Google, it logs you into all of their services (like Gmail, Webmaster Tools, Blogger etc.). How would I do this in PHP and MySQL?
     
    AllWhatsRock, Jun 15, 2011 IP
  2. The Webby

    The Webby Peon

    Messages:
    1,852
    Likes Received:
    30
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Store user data in one database, and share it with all the service. Use secure cookies to store user info for consistent login across different services (if on different web servers and domain) ..
     
    The Webby, Jun 15, 2011 IP
  3. AllWhatsRock

    AllWhatsRock Active Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #3
    So lets say I have a PHPBB forum and a custom made answers script for example, would I place the same database name and password in the them both?
     
    AllWhatsRock, Jun 15, 2011 IP
  4. The Webby

    The Webby Peon

    Messages:
    1,852
    Likes Received:
    30
    Best Answers:
    1
    Trophy Points:
    0
    #4
    Use PHPBB's database and share it with your custom script...
     
    The Webby, Jun 15, 2011 IP
  5. AllWhatsRock

    AllWhatsRock Active Member

    Messages:
    60
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #5
    Yes that's what I thought, I just weren't that sure. Thank you guys for the help!
     
    AllWhatsRock, Jun 15, 2011 IP
  6. pr-biztech

    pr-biztech Peon

    Messages:
    76
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I do not more but I think "One nice feature when using WHMCS is that the end user can use one login for account management and billing and support. The only other login is for your control panel. As well, as far as I know, Hsphere customers use just one login for everything - site management, account management, billing and support." will help you.
     
    pr-biztech, Jun 16, 2011 IP
  7. MezaTech

    MezaTech Greenhorn

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #7
    use one database for login ,, then put the information in secure cookie ...
    in other app you can retrieve the login from cookie
     
    MezaTech, Jun 19, 2011 IP
  8. WiserX

    WiserX Peon

    Messages:
    16
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi...

    Use a common method for storing User-name, Password and other user details. You may use a centralized database for all services. You can use proxy method between all domains/services to share user info. If possible, you may edit user authentication of CMS. But this method is a hard to implement method.
     
    WiserX, Jun 20, 2011 IP
  9. seowikiliks

    seowikiliks Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
        function GoogleLogin($Login, $Passw)
        {   
            $this->Get('https://www.google.com/accounts/ServiceLogin');
            $this->Content = str_replace("\n", "", $this->Content);
            $this->Content = str_replace("\r", "", $this->Content);
            $GALX = $this->FieldVal('GALX'); //find hide GALX
    	    $dsh = $this->FieldVal('dsh'); // find hide dsh
            $this->Post('https://www.google.com/accounts/ServiceLoginAuth', "ltmpl=default&ltmplcache=2&rm=false&dsh=$dsh&scc=1&GALX=$GALX&Email=$Login&Passwd=$Passw&rmShown=1&signIn=Sign+in&asts=");
            if(strpos($this->Cookies, $Login)) return true; else return false;
        }
    PHP:
    and + you mysql :rolleyes:
     
    seowikiliks, Jun 22, 2011 IP