"Email in JWT token doesn't match email passed into mutation"

I want to create user using “createOwnerVehicleUserWithToken” mutation, it works fine when I use it in insomnia, I put a token generated in firebase as the header and the user is created, but I need to create the user with that same mutation using a custom function, but is is not working.

The user is successfully created in firebase, but when I want to execute the mutation it is showing me the error “Email in JWT token doesn’t match email passed into mutation”, I confirmed that the header passed in the mutation is the same token that is generated by firebase, and the email inserted in the query is the same that the token has.

Is there any solution to this problem?

Are you sure you use id_token and not access_token?

yes, I use the right token

Can you share your CF code and ideally the whole local project?
Just send it to foma.bagiyan@8base.com, I will look at it.

Before any deploy I always use the mock file to test my custom function.
That was the problem.
When I used the mock file It always showed the same error, I deployed the custom function to the corresponding workspace and it works as expected.
So I have no idea why the the mock file didn’t work, but everything is fine now