Skip to content

Web debug token different each time for App Check #10265

Answered by abel-123
arisAlexis asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, I had the same issue. Hard coding the token into index.html works but feels like a big security risk. For obvious reasons I also don't want to add a new debug token through Firebase console every time I run on localhost.

I was about to post this message end with "there must be a better solution" and then it hit me: The debug token is changing every time because Android Studio changes the port on every run!

Run your app and specify the port to keep using the same debug token.

In index.html:
<script> self.FIREBASE_APPCHECK_DEBUG_TOKEN = true;</script>

When you run the application specify the port:
flutter run -d chrome --web-port=1234

Check the log for the debug token as per the instr…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by arisAlexis
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants