[null,null,["Last updated 2024-01-23 UTC."],[],[],null,["# firebase::auth::IdTokenListener Class Reference\n\nfirebase::auth::IdTokenListener\n===============================\n\n\n**This is an abstract class.**\n\n\n`#include \u003cauth.h\u003e`\n\nListener called when there is a change in the ID token.\n\nSummary\n-------\n\nOverride base class method to handle ID token changes. Methods are invoked asynchronously and may be invoked on other threads.\n\n| ### Constructors and Destructors ||\n|---|---|\n| [~IdTokenListener](#classfirebase_1_1auth_1_1_id_token_listener_1a68c92b066db38dcddb317fdaec7d1555)`()` ||\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|\n| [OnIdTokenChanged](#classfirebase_1_1auth_1_1_id_token_listener_1aa09db55f7cd7321f5177c0c40bc7401a)`(`[Auth](/docs/reference/cpp/class/firebase/auth/auth#classfirebase_1_1auth_1_1_auth)` *auth)=0` | `virtual void` Called when there is a change in the current user's token. |\n\nPublic functions\n----------------\n\n### OnIdTokenChanged\n\n```c++\nvirtual void OnIdTokenChanged(\n Auth *auth\n)=0\n``` \nCalled when there is a change in the current user's token.\n\n\n- Right after the listener has been registered\n- When a user signs in\n- When the current user signs out\n- When the current user changes\n- When there is a change in the current user's token\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `auth` | Disambiguates which [Auth](/docs/reference/cpp/class/firebase/auth/auth#classfirebase_1_1auth_1_1_auth) instance the event corresponds to, in the case where you are using more than one at the same time. | |\n\n### \\~IdTokenListener\n\n```c++\nvirtual ~IdTokenListener()\n``` \n\n| **Note:** : Destruction of the listener automatically calls RemoveIdTokenListener() from the Auths this listener is registered with, if those Auths have not yet been destroyed.\n\n\u003cbr /\u003e"]]