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 931749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:33:19+00:00 2026-05-15T20:33:19+00:00

I’m getting confused. I was able to make openid login kinda work using LightOpenID

  • 0

I’m getting confused.

I was able to make openid login kinda work using LightOpenID.

All I get doing that is just an openid_identity such as “https://www.google.com/accounts/o8/id?id=xxx“. Pretty disappointing: I was expecting to get the email address too.

i.e. I need to login (that’s what openid does) and to know the email address of the google account the user used to login.

There is the function $openid->getAttributes() but all I get from that is just an empty array: I guess google isn’t going to give me anything else than that openid_identity.

So I guess I’m supposed to use OAuth, right?
I’m clueless about that.
I’ve only found horrible and confused documentation, that either pretends to explain everything (and I do mean everything), or it fails explain anything at all.

Yes, of course I’ve tried to look at the previous posts about that, just as I did search on google. Read again the above paragraph, please.

  • 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-15T20:33:20+00:00Added an answer on May 15, 2026 at 8:33 pm

    I’ve just discovered LightOpenID and I think it’s wonderful. I’ve managed to get the email address, the first and last name and the prefered language using the following modification of example-gmail.php:

    <?php
    
    require_once('openid.php');
    
    if (empty($_GET['openid_mode']))
    {
        if (isset($_GET['login']))
        {
            $openid = new LightOpenID();
            $openid->identity = 'https://www.google.com/accounts/o8/id';
            $openid->required = array('namePerson/first', 'namePerson/last', 'contact/email', 'pref/language');
    
            header('Location: ' . $openid->authUrl());
            //header('Location: ' . str_replace('&amp;', '&', $openid->authUrl()));
        }
    
        else
        {
            echo '<form action="?login" method="post">' . "\n";
            echo '<button>Login with Google</button>' . "\n";
            echo '</form>' . "\n";
        }
    }
    
    else if ($_GET['openid_mode'] == 'cancel')
    {
        echo 'User has canceled authentication!';
    }
    
    else
    {
        $openid = new LightOpenID();
    
        echo 'User ' . ($openid->validate() ? $_GET['openid_identity'] . ' has ' : 'has not ') . 'logged in.';
    
        echo '<pre>';
        print_r($openid->getAttributes());
        echo '</pre>';
    }
    
    ?>
    

    I changed the code to make it a little more readable, the output:

    User https://www.google.com/accounts/o8/id?id=*** has logged in.
    
    Array
    (
        [namePerson/first] => Alix
        [contact/email] => ***@gmail.com
        [pref/language] => en
        [namePerson/last] => Axel
    )
    

    I still can’t get the postal code and others from Google but I’ve had success with myOpenID.com.

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

Sidebar

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.