You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -769,11 +769,30 @@ You can also change the `url` variable, used to test the API with authentication
769
769
First you need to create a Firebase project on the [Firebase console](https://console.firebase.google.com/).
770
770
Add a web application to this project and grab the code snippet for later use.
771
771
772
-
Then you have to configure the `jwtAuth.secrets` configuration in your `api.php` file.
773
-
Grab the public key via this [URL](https://www.googleapis.com/robot/v1/metadata/x509/[email protected]).
774
-
There may be several certificates, just grab the one corresponding to your `kid` (if you don't
775
-
know what it is, just test them all until you will be logged in).
776
-
Now, just fill `jwtAuth.secrets` with your public key.
772
+
Then you have to configure the `jwtAuth.secrets` configuration in your `api.php` file.
773
+
This can be done as follows:
774
+
775
+
a. Log a user in to your Firebase-based app, get an authentication token for that user
776
+
b. Go to [https://jwt.io/](https://jwt.io/) and paste the token in the decoding field
777
+
c. Read the decoded header information from the token, it will give you the correct `kid`
778
+
d. Grab the public key via this [URL](https://www.googleapis.com/robot/v1/metadata/x509/[email protected]), which corresponds to your `kid` from previous step
779
+
e. Now, just fill `jwtAuth.secrets` with your public key in the `api.php`
780
+
781
+
Here is an example of what it should look like in the configuration:
0 commit comments