Packagecom.myflashlab.air.extensions.firebase.core
Classpublic class FirebaseInstanceId
InheritanceFirebaseInstanceId Inheritance flash.events.EventDispatcher

Firebase Instance ID provides a unique identifier for each app instance and a mechanism to authenticate and authorize actions (example: sending FCM messages).

Access the FirebaseInstanceId by calling methods and properties through Firebase.iid..



Public Methods
 MethodDefined By
  
deleteIID():void
Delete the Instance ID and the data associated with it.
FirebaseInstanceId
  
deleteToken($authorizedEntity:String, $scope:String):void
Revokes access to a scope (action) for an entity previously authorized by Firebase.iid.getToken();
FirebaseInstanceId
  
getID():void
Returns a stable identifier that uniquely identifies the app instance.
FirebaseInstanceId
  
Returns the ID and automatically generated token for this Firebase project.
FirebaseInstanceId
  
getToken($authorizedEntity:String, $scope:String):void
Returns a token that authorizes an Entity to perform an action on behalf of the application identified by Instance ID.
FirebaseInstanceId
Method Detail
deleteIID()method
public function deleteIID():void

Delete the Instance ID and the data associated with it. This stops the periodic sending of data to the Firebase backend started when the Instance ID was generated, unless another library that requires InstanceId (like FCM, RemoteConfig or Analytics) is used.

A new Instance ID is generated asynchronously if Firebase Cloud Messaging auto-init is enabled.

deleteToken()method 
public function deleteToken($authorizedEntity:String, $scope:String):void

Revokes access to a scope (action) for an entity previously authorized by Firebase.iid.getToken();

Parameters

$authorizedEntity:String — Entity that must no longer have access.
 
$scope:String — Action that entity is no longer authorized to perform.

getID()method 
public function getID():void

Returns a stable identifier that uniquely identifies the app instance. Once an Instance ID is generated, the library periodically sends information about the application and the device where it's running to the Firebase backend. To stop this, see deleteInstanceId().

See also

getInstanceId()method 
public function getInstanceId():void

Returns the ID and automatically generated token for this Firebase project. This generates an Instance ID if it does not exist yet, which starts periodically sending information to the Firebase backend (see getId()). You should listen to FirebaseEvents.IID_TOKEN event to receive the generated token.

getToken()method 
public function getToken($authorizedEntity:String, $scope:String):void

Returns a token that authorizes an Entity to perform an action on behalf of the application identified by Instance ID.

This generates an Instance ID if it does not exist yet, which starts periodically sending information to the Firebase backend.

This is similar to an OAuth2 token except, it applies to the application instance instead of a user.

For example, to get a token that can be used to send messages to an application via FirebaseMessaging, set authorizedEntity to the sender ID, and set scope to "FCM".

Parameters

$authorizedEntity:String
 
$scope:String

See also