GuillaumeC
GuillaumeC

Reputation: 555

"The custom token format is incorrect. Please check the documentation." but still able to access the records

I'm trying to use the custom token, and when I try to test with a fake token, I get the error:

The custom token format is incorrect. Please check the documentation. Completely normal.

But I realized I can still access the records.

The URL is /users/

And the rules:

{
    "rules": {
        "users": {
            "$uid": {
                ".write": "auth.uid != null && $uid === auth.token.user",
                ".read": "auth.uid != null && $uid === auth.token.user",
            }
        },
     ".read": false,
     ".write": false
   }
}

Upvotes: 0

Views: 4404

Answers (1)

wakeup
wakeup

Reputation: 495

See if this can be of any help. I was facing the same issue. It turned out that I was setting too large expiry time. It should be <= 1 hour.

https://groups.google.com/forum/#!topic/firebase-talk/tYRfde4nwBY

Upvotes: 6

Related Questions