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

How to create DEFAULT_TOKEN #46

Closed
evansnguyen0104 opened this issue Jul 20, 2016 · 12 comments
Closed

How to create DEFAULT_TOKEN #46

evansnguyen0104 opened this issue Jul 20, 2016 · 12 comments

Comments

@evansnguyen0104
Copy link

evansnguyen0104 commented Jul 20, 2016

Hello guys.
How do I get DEFAULT_TOKEN configuration ?
I was using Firebase token generator php but it not working.
Can you help me ?
Thank a lot

@greabock
Copy link

greabock commented Aug 9, 2016

@anhnt0212 same problem. Have you any solution?

@parthjdabhi
Copy link

@ktamas77 @llbbl @brianpilati @craigrusso can you help ?

@evansnguyen0104
Copy link
Author

@greabock i don't have :(

@evansnguyen0104
Copy link
Author

Can you help me ?

On Mon, Aug 22, 2016 at 6:18 PM, Parth Dabhi (iOS & Android developer) <
notifications@github.com> wrote:

@ktamas77 https://github.com/ktamas77 @llbbl https://github.com/llbbl
@brianpilati https://github.com/brianpilati @craigrusso
https://github.com/craigrusso can you help ?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#46 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMkHvQFADBySMb_3IE8RLr_lliP80huSks5qiYV1gaJpZM4JQhvo
.

@skizzo
Copy link

skizzo commented Aug 24, 2016

Chin up champs, in your firebase console, just go to the project settings, then to the tab database and then copy the secret key. Worked like a charm for me!

firebasephpdefaulttoken

@evansnguyen0104
Copy link
Author

@skizzo tks a lot.let me check again :D

@martisj
Copy link

martisj commented Oct 18, 2016

Does this database secret override all the security rules defined?

@evansnguyen0104
Copy link
Author

@martisj i think it no

@codemonkeynorth
Copy link

codemonkeynorth commented Nov 6, 2016

I believe this is deprecated now? Or am i looking at the wrong thing?

image

@quocthinh212
Copy link

token

@codemonkeynorth
Copy link

yes the secret still works but it is deprecated. you ought to be using Service Accounts now but this library does not yet support it

v1.x/2.x Firebase JWT token's that @anhnt0212 is using are not the same as the secret.

you could try kreait's version instead, which supports the Service Accounts used by v3.x firebase

having looked at that codebase, it's not simple so it's no small task that we are asking @ktamas77 to do to update this library to the new version by the way

what are you actually trying to do @anhnt0212 ?

@codemonkeynorth
Copy link

codemonkeynorth commented Dec 12, 2016

ps if you use REST to access Firebase .json I believe authentication works in either of the following ways

...something.json?auth={secret} // DEFAULT_TOKEN in ktamas77's docs
...something.json?auth={JWT}
...something.json?access_token={v3_service_account_oauth_token_etc}

I believe the middle one is what the token generator library you are using provides @anhnt0212

as you can see the token is passed in the querystring options for auth
https://github.com/ktamas77/firebase-php/blob/master/src/firebaseLib.php#L107

you could try creating a JWT token with Firebase token generator using your secret, and then pass that token into @ktamas77's library... if you don't want to pass your secret directy. I've not tried it though. it depends if it should be passed as auth= or access_token=

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

8 participants