Reputation: 1666
Background
I am using laravel to create some backend APIs.
These APIs require to be authenticated using firebase auth.
I created a firebase authentication function in my project, and now need the JWT token to test it out using postman.
I am not in charge of the front end, so I do not need to create a login system, and if possible I would like to have a token I can permanently use while developing.
Question
Is there any way I can easily get a permanent firebase token for development, without having to create a client side log in system?
Similar Question
Is there a way to make a firebase auth token for development?
I found this similar question from three years ago but it was unanswered.
Any help would be appreciated!
Alternative Question
What is the easiest way to issue a Firebase API token step-by-step? I am a bit new and couldn't understand the contents of this page that well.
https://firebase.google.com/docs/auth/admin/create-custom-tokens
Upvotes: 1
Views: 1470
Reputation: 645
If you're using Postman, why not:
Something like POST to https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key=[API_KEY]
with body:
{
"email": "abc@def.com",
"password":"password",
"returnSecureToken":true
}
Upvotes: 3