Methods
FluroAuth.addEventListener
Adds a callback that will be triggered whenever the specified event occurs(event, callback)
- Source:
Example
//Listen for when the user session changes
FluroAuth.addEventListener('change', function(userSession) {})
Parameters:
| Name |
Type |
Description |
event |
String
|
The event to listen for |
callback |
function
|
The function to fire when this event is triggered |
FluroAuth.removeAllListeners
Removes all listening callbacks for all events()
- Source:
Example
FluroAuth.removeAllListeners()
FluroAuth.removeEventListener
Removes all a callback from the listener list(event, callback)
- Source:
Example
//Stop listening for the change event
FluroAuth.removeEventListener('change', myFunction)
Parameters:
| Name |
Type |
Description |
event |
String
|
The event to stop listening for |
callback |
function
|
The function to remove from the listener list |