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

  • SEARCH
  • Home
  • 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 8504279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:59:02+00:00 2026-06-11T01:59:02+00:00

I maintain an old web app written in C++ & javascript. I have been

  • 0

I maintain an old web app written in C++ & javascript. I have been asked to add Facebook, Google and Twitter login authentication.

The Facebook bit went well. I found some simple javascript code on Facebook’s developer site http://developers.facebook.com/docs/reference/javascript/ which I added to my login page. I then altered the C++ login cgi program to recognise callbacks from Facebook, and to log the user in using their email address (which is already held on file).

I’m stuck with the Google bit. At first I thrashed around on the Google site, but I couldn’t find any simple examples. I was directed to the libopkele C++ library, but I can’t find any instructions on how to use it (and I suspect it is not what I need). Then I found something called Google Friend Connect http://code.google.com/apis/friendconnect/docs/code.html (which, unfortunately, says it is depreciated). That contained a nice javascript example, which I put into my website. It provides a button that says “Sign in”, and when you click it, it pops up a window asking for your email address. You fill in the address, it says “Connecting to your IDP”, then “Redirecting to your IDP”, then my post-login page appears in the pop-up window.

Obviously I don’t want that – I want it to appear in the original window where they clicked the “Sign in” button.

Here is my javascript from the login page:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/googleapis/0.0.4/googleapis.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/jsapi"></script>
<script type="text/javascript">
  google.load("identitytoolkit", "1", {packages: ["ac"], language:"en"});
</script>
<script type="text/javascript">
  $(function() {
    window.google.identitytoolkit.setConfig({
        developerKey: "<I put my developer key here>",
        companyName: "<I put my company name here>",
        callbackUrl: "http://www.mywebsite.com/cgi-bin/login.cgi",
        realm: "",
        userStatusUrl: "http://http://www.mywebsite.com/cgi-bin/loginstatus.cgi",
        loginUrl: "http://http://www.mywebsite.com/cgi-bin/login.cgi",
        signupUrl: "http://http://www.mywebsite.com/cgi-bin/login.cgi",
        homeUrl: "http://www.mywebsite.com",
        logoutUrl: "http://http://www.mywebsite.com/cgi-bin/logout.cgi",
        idps: ["Gmail", "GoogleApps", "Yahoo"],
        tryFederatedFirst: true,
        useCachedUserStatus: false
    });
    $("#navbar").accountChooser();
  });
</script>
<div id="navbar"></div>

I find my userStatusUrl is never called. The callbackUrl is called, but I am not sure what to return from it. It seems whatever I return is merely displayed on the page. I saw a passing reference somewhere to returning a json item containing {“registered” : true}, but that didn’t work either (here is the exact text I returned from my cgi script):

Content-Type: application/json
Content-Length: 20

{"registered" : true}

Any help, or pointers to a nice simple implementation appreciated. (A PHP script that uses external libraries would not be much help!)

  • 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-06-11T01:59:04+00:00Added an answer on June 11, 2026 at 1:59 am

    In the end, I used rpxnow.com, which provides easy to use login via a selection of providers using a single, simple, well-documented interface.

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

Sidebar

Related Questions

I maintain an old application written in VB6. In client's environment it raises runtime
I have to maintain an old VB 6 ActiveX DLL called by another third-party
I Have a old database to maintain .... they have stored html tags in
Most of the software company have old software which continue maintain, and they also
I have a codebase of Javascript files that I use to drive a Web
I have to maintain an old project without documentation, and there is a database
I've taken over support of a legacy web app written predominantly in classic ASP.
I'm overseeing the overhaul an asp.old web app for order entry into .net. So
I have to maintain an old database which is not properly normalized. For instance
I maintain an old PC-only application written in Delphi 7. Although Delphi has served

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.