mongodb-atlasmongodb-stitchmongodb-realm

'"hrms-dev"' not found in 'aud' claim in Mongodb?


I am using mongodb and firebase for authentication purpose. I have enabled Custom JWT Authentication. PFA pic of authentication provider. Authentication provider

and also I have mentioned metadata fields and audience("hrms-dev") but when I try to login, I am getting error like the below. mongodb log

I tried many ways still I am unable get the solution. Please help me out with the solutions. Thanks in advance.


Solution

  • Actually I have mentioned firebase project name in audience in mongodb but we need to mentioned firebase projectId instead of project name. It's working fine. If you have any other queries check in this link Custom JWT Authentication