packages/auth/demo/public/script.js
function onSetPersistence() {
  var type = $('#persistence-type').val();
  try {
    auth.setPersistence(type).then(function() {
      log('Persistence state change to "' + type + '".');
      alertSuccess('Persistence state change to "' + type + '".');
    }, function(error) {
      alertError('Error: ' + error.code);
    });
  } catch (error) {
    alertError('Error: ' + error.code);
  }
}
function onSetPersistence() {
  var type = $('#persistence-type').val();
  try {
    auth.setPersistence(type).then(function() {
      log('Persistence state change to "' + type + '".');
      alertSuccess('Persistence state change to "' + type + '".');
    }, function(error) {
      alertError('Error: ' + error.code);
    });
  } catch (error) {
    alertError('Error: ' + error.code);
  }
}
function onSetPersistence ( ) { var type = $ ( '#persistence-type' ) . val ( ) ; try { auth . setPersistence ( type ) . then ( function ( ) { log ( 'Persistence state change to "' + type + '".' ) ; alertSuccess ( 'Persistence state change to "' + type + '".' ) ; } , function ( error ) { alertError ( 'Error: ' + error . code ) ; } ) ; } catch ( error ) { alertError ( 'Error: ' + error . code ) ; } }
Changes the Auth state persistence to the specified one.
Changes the Auth state persistence to the specified one .