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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:46:50+00:00 2026-05-26T23:46:50+00:00

When the user gets to my page (similar to the Google Plus API PHP

  • 0

When the user gets to my page (similar to the Google Plus API PHP starter), my app needs the authorization to access the user’s profile. The callback URI I set is the page itself. Initially, everything worked perfectly: the user comes back to my page with successful authorization ($authUrl is not set, while $me and $activities are set).

However, now I need to pass a parameter called ‘id’ from before the authorization to after and this seems to MESS EVERYTHING UP 🙁

If there is a session variable or a cookie when the authorization request is sent, the user comes back to my page without the authorization ($authUrl is set, while $me and $activities are NULL).

Even more weird: after using

setcookie(‘storedid’, $_GET[‘id’], time()+3600, ‘/’, ‘.mydomain.com’);

the user comes back WITHOUT authorization), while with:

setcookie(‘storedid’, $_GET[‘id’], $expire, ‘/anysubfolder/’, ‘.mydomain.com’);

it works perfectly! Also, at some point I made a typo and $_GET[‘id’] was NULL and, even if the cookie was in the ‘/’ path, the authorization was successful!

Is there a way I can pass a parameter from before to after the authorization?

I’m starting to think about crazy stuff (writing the ‘id’ to a SQL table, together with the user’s IP address and retrieving it with a query after the authorization) but it is not robust and frankly it would suck!

  • 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-26T23:46:51+00:00Added an answer on May 26, 2026 at 11:46 pm

    You can send a state parameter with the user when they got to authorize access as described in the OAuth 2 spec and it will be returned with the user.

    For example https://accounts.google.com/o/oauth2/auth?state=xyz123&scrope=https://www.googleapis.com/auth/plus.me...

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

Sidebar

Related Questions

I want to redirect a user who gets from page.php?letter=A&num=2 to the following address:
I got a page that is a callback page, when the user gets redirected
url: page.php?sid=session_id(); php code: if ($_REQUEST['sid']) session_id($_REQUEST['sid']); session_start(); Question: im trying to access php
Let's say a user gets a page /form/ GET /form/ He then fills in
Say I am rolling out a CMS. Each user gets their own page at
I'm building an installer for an application. The user gets to select a datasource
I'm building an installer for an application. The user gets to select a datasource
I am creating a matching game for Android, and when the user gets a
If we export to Excel from the ReportingServices reports web site, the user gets
So basically, I have a bunch of TextBoxes that the user gets to fill

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.