Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4026012
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:55:03+00:00 2026-05-20T10:55:03+00:00

Eg: Gmail, Orkut, Wava and feedburner login access using single google account.

  • 0

Eg: Gmail, Orkut, Wava and feedburner login access using single google account.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:55:03+00:00Added an answer on May 20, 2026 at 10:55 am

    Your question is too unspecific to give a precise answer. If you’re trying to let users log in to your website using Google accounts, it’s documented here.

    On the other hand, if you’re trying to let your users sign in to several websites you control with one account, here’s how you can do it:

    Make all login links on your sites point to a centralized login page, but include information about where the user came from in the link. For example:

    <a href='http://login.example.com/login.php?source=my.other.site.com/foo/bar'>log in!!</a>
    

    Then, once the user has logged in successfully, you redirect the user back to the original site while passing along whatever information you need about the authenticated user.

    However, you also need to make sure that people can’t just circumvent your authentication mechanism by adding the necessary authentication parameters to the URL. This can be done by including a signature in the form of an HMAC-SHA-256 of the parameters plus a secret that’s stored on both login server and the originating site. (Preferably this key should be different for each site using your SSO system.)

    <?php
    $MySecretKey = 'Nobody Will Ever Guess This!!';
    
    // Generate signature from authentication info + secret key
    $sig = hash(
        'sha256',
         $user->id . $user->email,
         $MySecretKey
    );
    
    // Make sure we're redirecting somewhere safe
    $source = parse_url($_GET['source']);
    if(in_array($source->host, $list_of_safe_hosts))
      $target = 'http://'.$source->host.$source->path;
    
    // Send the authenticated user back to the originating site
    header('Location: '.$target.'?'.
        'user_id='.$user->id.
        '&user_email='.urlencode($user->email).
        '&sig='.$sig);
    ?>
    

    Then, in the originating site, if the signature matches the user is already logged in. Store the info about the logged in user in session variables (not a cookie):

    <?php
    $MySecretKey = 'Nobody Will Ever Guess This!!';
    
    // Set not logged in by default
    $user_id = 0;
    $user_email = '';
    
    if(intval($_GET['user_id']) && !$_SESSION['user_id']) // Someone trying to log in?
    {
      // See if they have the right signature
      if (hash_equals(hash('sha256', intval($_GET['user_id']).$_GET['user_email'], $MySecretKey), $sig)) {
        $_SESSION['user_id'] = intval($_GET['user_id']);
        $_SESSION['user_email'] = $_GET['user_email'];
      }
    }
    
    ?>
    

    Note that I’m using a function added in PHP 5.6: hash_equals. If you’re on lower than 5.6, you can use this substitute function which implements a timing-safe comparison function using double HMAC verification:

    function hash_equals($a, $b) {
        $key = mcrypt_create_iv(128, MCRYPT_DEV_URANDOM);
        return hash_hmac('sha512', $a, $key) === hash_hmac('sha512', $b, $key);
    }
    

    This is obviously a very crude implementation, but it should be a decent starting point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to monitor a gmail account using imaplib without polling gmail
Is there a way to aid gmail in making threads? We are currently using
does not work in case of IGoogle/Gmail application but the same works on Orkut!
Gmail automatically greys text that looks like a signature. Anyone have any guesses how
In Gmail, I have a bunch of labeled messages. I'd like to use an
This is a new gmail labs feature that lets you specify an RSS feed
Anybody know how to get gmail's OpenID working? All I find is this http://openid-provider.appspot.com/
I really like the way gmail has the archive system implemented. I can archive
have you ever noticed how in gmail, as the emails are updated in your
I've been looking at ways to implement gmail-like messaging inside a browser, and arrived

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.