Home > Mobile >  Can I unverify users in firebase programmatically?
Can I unverify users in firebase programmatically?

Time:05-31

I want to unverify users which were verified everytime they sign out in my app. This is to achieve the behaviour I want for my app using firebase SDK. But, somehow, I can't find any solution (If it's really possible) for that. Can anyone enlighten me? Thanks, BTW! :)

CodePudding user response:

There is no API to set the emailVerified property of the current user profile to false in the client-side SDKs for Firebase Authentication.

What you can do though is modify the user profile by using the Admin SDK and set the property to false there.

Since the Admin SDK can only be used in trusted environments, it won't run in the client-side app, and you'll have to do this by making a custom API that your app can call. If you don't have an existing server where you can run this API, consider using a serverless solution like Cloud Functions or Cloud Run.

  • Related