SSO Timestamp expired. Redirecting back to SSO Url.

cwillenbrockcwillenbrock Member
in Bugs & Feature Requests edited September 2013
So I've got an odd predicament.

I'm having problems with SSO users checking out on my site. Non SSO users, or users who checkout as guests, seem to be able to complete transactions, but not SSO users.

The error that keeps showing up in the error log is SSO Timestamp expired. Redirecting back to SSO Url. (as may be insinuated by the post title).

I checked the timestamp and i'm not sure why it be throwing things off; especially since the same timestamp is given whether the users is logged in or not. It just doesn't like it when there's a SSO user.

In case there's something I'm missing, here's my validation code to generate the SS:
public function validation(){
	
		//PULL TIMESTAMP FROM URL
		$timestamp			= $_GET['timestamp'];
		
		//CHECK IF LOGGED IN
		$logged_in 			= filter_var($this->session->userdata('logged_in'), FILTER_VALIDATE_BOOLEAN);

		$customer_id		= $logged_in ? $this->session->userdata('foxyID') : 0;
		$fcsid				= $_GET['fcsid'];
		$auth_token			= sha1($customer_id . '|' . $timestamp . '|' . FOXY_API_TOKEN);
		
		$redirect_complete	= 'https://' . FOXY_DOMAIN . '/checkout?fc_auth_token=' . $auth_token . '&fcsid=' . $fcsid . '&fc_customer_id=' . $customer_id . '&timestamp=' . $timestamp;
		//header('Location: ' . $redirect_complete);

		redirect($redirect_complete, 'location');
	}


Any ideas?
Comments
  • fc_adamfc_adam FoxyCart Team
    @cwillenbrook,

    You're not increasing the timestamp at all? You need to add some additional time to the timestamp your SSO endpoint is given to set when the SSO expires. The timestamp is the current time on the server, so you add however many seconds you want to set the SSO to be valid for. For example, adding 1800 to the timestamp would make it valid for 30 minutes.
  • Well... now I feel stupid.

    Thanks as always @fc_adam.

    I think i need to put the coffee down and except that I may have spent too many hours in front of the computer.
  • fc_adamfc_adam FoxyCart Team
    @cwillenbrock,

    No worries at all - I totally understand that feeling!
Sign In or Register to comment.