Getting a POST 403 after a period of user inaction

845 views
Skip to first unread message

Dirk Bruins

unread,
Apr 22, 2017, 6:45:10 PM4/22/17
to Firebase Google Group
I have my code set up as per these instruction: https://github.com/firebase/emberfire/blob/master/docs/guide/authentication.md

After a user signs in, as long as they are using the app all seems fine, but if there is no action (calls to the firebase db) for some time (haven't narrowed it down exactly, but seems to be in the 10 min range), then the console shows:


I've looked high and low and can't find a solution.

The web app is here: https://speedjots.com


I have a feeling it's something basic that's missing but ... I'm at a loss.

Bassam

unread,
Apr 24, 2017, 1:31:40 AM4/24/17
to Firebase Google Group
Hey Dirk, can you provide the detailed 403 response from the network console?
I signed in using a Google account to https://speedjots.com and waited for more than 15mins with no activity but got no error.

Bassam

unread,
Apr 24, 2017, 1:39:10 PM4/24/17
to Firebase Google Group
Hey Dirk, I was able to recreate it. The error is:
{
  "error": {
    "code": 403,
    "message": "Token Service API has not been used in project speed-jots before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/securetoken.googleapis.com/overview?project=speed-jots then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
    "status": "PERMISSION_DENIED",
    "details": [
      {
        "@type": "type.googleapis.com/google.rpc.Help",
        "links": [
          {
            "description": "Google developers console API activation",
          }
        ]
      }
    ]
  }
}

It looks like you didn't create Firebase via the Firebase Console. The token service API is enabled automatically for you when you go through that flow. You need to manually enable it via the Google Cloud Platform console.

Bassam

Dirk Bruins

unread,
Apr 24, 2017, 5:45:46 PM4/24/17
to Firebase Google Group
Basam,

Not exactly sure how long it too this time, but looking back after 30min, my console read exactly this:


There is no additional info available (that I know of).

Thanks for checking it out.

Try logging in again, go do something productive (pet the cat), and check periodically, eventually the 403 message should pop up.

On Sunday, April 23, 2017 at 10:31:40 PM UTC-7, Bassam wrote:

Dirk Bruins

unread,
Apr 24, 2017, 5:45:46 PM4/24/17
to Firebase Google Group
Thanks Bassam!

I enabled the token service API on the Google Cloud Platform console.  I'll test it and reply only if there's an issue.

You write, "looks like you didn't create Firebase via the Firebase Console".  When I created the Firebase, I logged into my Firebase Console, clicked on "Add project" and went from there.  Is this what you mean?

Two questions:
1. How did you get the details of the 403 error message?  (So I can diagnose myself in the future.)
2. If I created the Firebase correctly, should I just double check in Google Cloud Platform that the token API is enabled?

Thanks again!
Reply all
Reply to author
Forward
0 new messages