Reputation: 1
Error:
[firebase_messaging/token-subscribe-failed] Messaging: A problem occurred while subscribing the user to FCM: Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project. .
at Object.createErrorWithStack (http://localhost:2277/dart_sdk.js:5080:12)
at Function._throw (http://localhost:2277/dart_sdk.js:20337:18)
at Function.throwWithStackTrace (http://localhost:2277/dart_sdk.js:20334:18)
at async._AsyncCallbackEntry.new.callback (http://localhost:2277/dart_sdk.js:40851:18)
at Object._microtaskLoop (http://localhost:2277/dart_sdk.js:40708:13)
at _startMicrotaskLoop (http://localhost:2277/dart_sdk.js:40714:13)
at http://localhost:2277/dart_sdk.js:36191:9
Upvotes: 0
Views: 1608
Reputation: 191
You need to generate a Vapid Key in the Firebase Settings | Cloud Messaging tab.
Please check the following answer on how to do that.
https://stackoverflow.com/a/54996207/10086962
Upvotes: 1