0

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

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. – Empty Brain May 19 '22 at 19:00

1 Answers1

1

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

D. Ndungu
  • 131
  • 1
  • 8