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);
    }
  }
docs: Changes the Auth state persistence to the specified one.