3

I have written my own cloud functions and followed Verify App Check tokens from a custom backend to enforce AppCheck on my API. I now want to test my deployed functions with POSTMAN, but the verification denies it with the following message: Decoding App Check token failed. Make sure you passed the entire string JWT which represents the Firebase App Check token. I can make it work by running the android or iOS app, print the token, copy, and paste it on POSTMAN, but that takes a lot of time. I have also tried generating debug token for Android and iOS and pass that in the X-Firebase-AppCheck header and no luck.

How can I make this work?

Thank you.

favs
  • 184
  • 6
  • please refer to the Github issue [App check is not working with callable cloud functions](https://github.com/firebase/flutterfire/issues/6794) – Sathi Aiswarya Apr 15 '22 at 06:56
  • Thank you for your answer, although I don't think that answers my question. I just started working on my project again and this is what I'd like to do: Test my API automatically daily using POSTMAN. My Firebase Rest API uses [App Check tokens](https://firebase.google.com/docs/app-check/custom-resource-backend#verify_tokens) for security. This means that every API request needs `X-Firebase-AppCheck` header, but the debug tokens generated in Firebase App Check section do not quite work well with POSTMAN. – favs Jul 22 '22 at 17:18
  • Any chance you figured this out? Running into this now... – Josh R Nov 28 '22 at 01:03
  • @JoshR I did not. I just removed app check validation for my development project and kept it for production. – favs Nov 29 '22 at 03:22
  • @JoshR I actually found a solution. Let me know if you want a full guide on how to achieve this. – favs Dec 01 '22 at 00:57
  • @favs I would like that. I can't figure out how to send a token through Postman and get it validated on the backend – Jacobo Koenig Mar 14 '23 at 23:07
  • @favs I have the same problem! I'm calling a backend protected with App Check from an iOS client, I got the same error, I would like to know how you fixed it. – Diego Perdomo Jul 20 '23 at 00:46
  • I'm using a debug token inside a simulator by the way. – Diego Perdomo Jul 20 '23 at 01:27

0 Answers0