Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication failed: invalid_token #3

Closed
winstonma opened this issue Aug 9, 2016 · 5 comments
Closed

Authentication failed: invalid_token #3

winstonma opened this issue Aug 9, 2016 · 5 comments

Comments

@winstonma
Copy link

winstonma commented Aug 9, 2016

I created a Firebase project and downloaded this repo, created service-account.json.

In addition in the Database.java I added some sample code from the Firebase QuickStart Guide - Save Data to store some data. However I got the following error
[WARN] PersistentConnection: pc_0 - Authentication failed: invalid_token (Access denied.)

Here is my database rules.

{
  "rules": {
    ".read": true,
    ".write": true
  }
}

It should allows any read/write.

I have no idea how to get the auth done. Thanks for the help

@winstonma
Copy link
Author

Seem using firebase-server-sdk 3.0.1 solve the problem

@winstonma
Copy link
Author

Is it possible to update the SDK in the sample?

Thanks

samtstern added a commit that referenced this issue Aug 10, 2016
Raised in issue #3
@samtstern
Copy link
Contributor

@winstonma done!

@winstonma
Copy link
Author

winstonma commented Aug 11, 2016

Thanks

This is the solution I found in Stackoverflow.

Although your sample code have no problem. Some people (like me) would use your code a reference and expand their work. It would be great if any other developer didn't face the same problem and spend time searching stackoverflow.

@samtstern
Copy link
Contributor

@winstonma totally agree, this one is my fault for not upgrading the sample dependency version as soon as 3.0.1 was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants