function buildActionCodeSettings(
    opt_forceSameDevice, opt_providerId, opt_anonymousUid) {
  testStubs.replace(
      firebaseui.auth.util,
      'generateRandomAlphaNumericString',
      function(size) {
        assertEquals(32, size);
        return 'SESSIONID';
      });
  var builder = new firebaseui.auth.ActionCodeUrlBuilder(
      'https://www.example.com/completeSignIn');
  builder.setSessionId('SESSIONID');
  if (opt_providerId) {
    builder.setProviderId(opt_providerId);
  }
  builder.setForceSameDevice(opt_forceSameDevice || false);
  if (opt_anonymousUid) {
    builder.setAnonymousUid(opt_anonymousUid);
  }
  return {
    'url': builder.toString(),
    'handleCodeInApp': true
  };
}
Build action code settings.
@param {boolean=} opt_forceSameDevice Whether to force same device.
@param {?string=} opt_providerId The provider ID for linking flow.
@param {?string=} opt_anonymousUid The anonymous user's uid.
@return {!firebase.auth.ActionCodeSettings} The action code settings.