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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:08:44+00:00 2026-06-12T06:08:44+00:00

Using Symfony 2.0 and FOSOAuthServerBundle to implement an API Rest, I am having a

  • 0

Using Symfony 2.0 and FOSOAuthServerBundle to implement an API Rest, I am having a little of trouble.

I have all configured. I have a properly created client and I am trying to test the thing through a web browser (although the final thing will be to use the API form a iOS APP).

These are the steps:

  1. Get the authorization code: everything goes fine and I get inserted the auth code in the database and returned by the engine. Perfect
  2. Get the token: here is where the problem comes. When the code is generated (previous step), it is assigned an expiresAt field. And when I get to this point

    public function hasExpired()
    {
    if ($this->expiresAt) {
    return time() > $this->expiresAt;
    }
    }

it compares and returns true, i.e., the code is off (expired). And, as such, I get the following in the browser:

{"error":"invalid_grant","error_description":"The authorization code has expired"}

Any clue on this before I start to mess it all up?

Thank you.

  • 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-12T06:08:45+00:00Added an answer on June 12, 2026 at 6:08 am

    Ok, forget it.

    The matter was just that It was taking more than 30 seconds between the generation of the authorization code (in step one) and the generation of the security token (second step). And it was because I was debugging it to see what was going on.

    Sorry about that. I hope this helps anyone.

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

Sidebar

Related Questions

Using Symfony 2.0, I have a whole system working properly in localhost. Now I've
I have a project created using Symfony 1.4.15. Because I like Doctrine :) I
I'm using symfony 1.4 and am having trouble wrapping my mind around what seems
Using Symfony I created a form in the backend. I have a submit button,
we using symfony 1.0. We have an module work with Propel objects. The sql-querys
I'm using Symfony 2.1-dev and am having problems when authenticate users using a form.
I am using symfony 1.0 and have set routing for few URLs as below.
Using Symfony and Doctrine, I have a multi-select list box. The multiple default values
Using Symfony 1.4.5 with Doctrine I have a model which includes an uploaded image
I'm using Symfony 2.1 to build a website with a little login form. I'm

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.