Advertisement
Guest User

Untitled

a guest
Nov 9th, 2018
406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.36 KB | None | 0 0
  1. "use strict";
  2.  
  3. function CLoginPromptManager( strBaseURL, rgOptions )
  4. {
  5. // normalize with trailing slash
  6. this.m_strBaseURL = strBaseURL + ( strBaseURL.substr(-1) == '/' ? '' : '/' ) + ( this.m_bIsMobile ? 'mobilelogin' : 'login' ) + '/';
  7.  
  8. // read options
  9. rgOptions = rgOptions || {};
  10. this.m_bIsMobile = rgOptions.bIsMobile || false;
  11. this.m_strMobileClientType = rgOptions.strMobileClientType || '';
  12. this.m_strMobileClientVersion = rgOptions.strMobileClientVersion || '';
  13. this.m_bIsMobileSteamClient = ( this.m_strMobileClientType ? true : false );
  14.  
  15. this.m_$LogonForm = $JFromIDOrElement( rgOptions.elLogonForm || document.forms['logon'] );
  16.  
  17. this.m_fnOnFailure = rgOptions.fnOnFailure || null;
  18. this.m_fnOnSuccess = rgOptions.fnOnSuccess || null;
  19.  
  20. this.m_strRedirectURL = rgOptions.strRedirectURL || (this.m_bIsMobile ? '' : strBaseURL);
  21. this.m_strSessionID = rgOptions.strSessionID || null;
  22.  
  23. this.m_strUsernameEntered = null;
  24. this.m_strUsernameCanonical = null;
  25.  
  26. if ( rgOptions.gidCaptcha )
  27. this.UpdateCaptcha( rgOptions.gidCaptcha );
  28. else
  29. this.RefreshCaptcha(); // check if needed
  30.  
  31.  
  32. this.m_bLoginInFlight = false;
  33. this.m_bInEmailAuthProcess = false;
  34. this.m_bIntwofactrtorAuthProcess = false;
  35. this.m_twofactrtorModal = null;
  36. this.m_bEmailAuthSuccessful = false;
  37. this.m_bLoginTransferInProgress = false;
  38. this.m_bEmailAuthSuccessfulWantToLeave = false;
  39. this.m_btwofactrtorAuthSuccessful = false;
  40. this.m_btwofactrtorAuthSuccessfulWantToLeave = false;
  41. this.m_sOAuthRedirectURI = 'steammobile://mobileloginsucceeded';
  42. this.m_sAuthCode = "";
  43. this.m_sPhoneNumberLastDigits = "??";
  44. this.m_btwofactrtorReset = false;
  45.  
  46. // values we collect from the user
  47. this.m_steamidEmailAuth = '';
  48.  
  49.  
  50. // record keeping
  51. this.m_iIncorrectLoginFailures = 0; // mobile reveals password after a couple failures
  52.  
  53. var _this = this;
  54.  
  55. this.m_$LogonForm.submit( function(e) {
  56. _this.DoLogin();
  57. e.preventDefault();
  58. });
  59. // find buttons and make them clickable
  60. $J('#login_btn_signin' ).children('a, button' ).click( function() { _this.DoLogin(); } );
  61.  
  62. this.InitModalContent();
  63.  
  64. // these modals need to be in the body because we refer to elements by name before they are ready
  65. this.m_$ModalAuthCode = this.GetModalContent( 'loginAuthCodeModal' );
  66. this.m_$ModalAuthCode.find('[data-modalstate]' ).each( function() {
  67. $J(this).click( function() { _this.SetEmailAuthModalState( $J(this).data('modalstate') ); } );
  68. });
  69. this.m_$ModalAuthCode.find('form').submit( function(e) {
  70. _this.SetEmailAuthModalState('submit');
  71. e.preventDefault();
  72. });
  73. this.m_EmailAuthModal = null;
  74.  
  75. this.m_$ModalIPT = this.GetModalContent( 'loginIPTModal' );
  76.  
  77. this.m_$Modaltwofactrtor = this.GetModalContent( 'logintwofactrtorCodeModal' );
  78. this.m_$Modaltwofactrtor.find( '[data-modalstate]' ).each( function() {
  79. $J(this).click( function() { _this.SettwofactrtorAuthModalState( $J(this).data('modalstate') ); } );
  80. });
  81. this.m_$Modaltwofactrtor.find( 'form' ).submit( function(e) {
  82. // Prevent submit if nothing was entered
  83. if ( $J('#twof').val() != '' )
  84. {
  85. // Push the left button
  86. var $btnLeft = _this.m_$Modaltwofactrtor.find( '.auth_buttonset:visible .auth_button.leftbtn ' );
  87. $btnLeft.trigger( 'click' );
  88. }
  89.  
  90. e.preventDefault();
  91. });
  92.  
  93.  
  94.  
  95. // register to listen to IOS two factor callback
  96. $J(document).on('SteamMobile_ReceiveAuthCode', function( e, authcode ) {
  97. _this.m_sAuthCode = authcode;
  98. });
  99.  
  100. $J('#captchaRefreshLink' ).click( $J.proxy( this.RefreshCaptcha, this ) );
  101.  
  102. // include some additional scripts we may need
  103. if ( typeof BigNumber == 'undefined' )
  104. $J.ajax( { url: 'https://steamcommunity-a.akamaihd.net/public/shared/javascript/crypto/jsbn.js', type: 'get', dataType: 'script', cache: true } );
  105. if ( typeof RSA == 'undefined' )
  106. $J.ajax( { url: 'https://steamcommunity-a.akamaihd.net/public/shared/javascript/crypto/rsa.js', type: 'get', dataType: 'script', cache: true } );
  107. }
  108.  
  109. CLoginPromptManager.prototype.BIsIos = function() { return this.m_strMobileClientType == 'ios'; };
  110. CLoginPromptManager.prototype.BIsAndroid = function() { return this.m_strMobileClientType == 'android'; };
  111. CLoginPromptManager.prototype.BIsWinRT = function() { return this.m_strMobileClientType == 'winrt'; };
  112.  
  113. CLoginPromptManager.prototype.BIsUserInMobileClientVersionOrNewer = function( nMinMajor, nMinMinor, nMinPatch ) {
  114. if ( (!this.BIsIos() && !this.BIsAndroid() && !this.BIsWinRT() ) || this.m_strMobileClientVersion == '' )
  115. return false;
  116.  
  117. var version = this.m_strMobileClientVersion.match( /(?:(\d+) )?\(?(\d+)\.(\d+)(?:\.(\d+))?\)?/ );
  118. if ( version && version.length >= 3 )
  119. {
  120. var nMajor = parseInt( version[2] );
  121. var nMinor = parseInt( version[3] );
  122. var nPatch = parseInt( version[4] );
  123.  
  124. return nMajor > nMinMajor || ( nMajor == nMinMajor && ( nMinor > nMinMinor || ( nMinor == nMinMinor && nPatch >= nMinPatch ) ) );
  125. }
  126. };
  127.  
  128. CLoginPromptManager.prototype.GetParameters = function( rgParams )
  129. {
  130. var rgDefaultParams = { 'donotcache': new Date().getTime() };
  131. if ( this.m_strSessionID )
  132. rgDefaultParams['sessionid'] = this.m_strSessionID;
  133.  
  134. return $J.extend( rgDefaultParams, rgParams );
  135. };
  136.  
  137. CLoginPromptManager.prototype.$LogonFormElement = function( strElementName )
  138. {
  139. var $Form = this.m_$LogonForm;
  140. var elInput = this.m_$LogonForm[0].elements[ strElementName ];
  141.  
  142. if ( !elInput )
  143. {
  144. var $Input = $J('<input/>', {type: 'hidden', name: strElementName } );
  145. $Form.append( $Input );
  146. return $Input;
  147. }
  148. else
  149. {
  150. return $J( elInput );
  151. }
  152. };
  153.  
  154. CLoginPromptManager.prototype.HighlightFailure = function( msg )
  155. {
  156. if ( this.m_fnOnFailure )
  157. {
  158. this.m_fnOnFailure( msg );
  159.  
  160. // always blur on mobile so the error can be seen
  161. if ( this.m_bIsMobile && msg )
  162. $J('input:focus').blur();
  163. }
  164. else
  165. {
  166. var $ErrorElement = $J('#error_display');
  167.  
  168. if ( msg )
  169. {
  170. $ErrorElement.text( msg );
  171. $ErrorElement.slideDown();
  172.  
  173. if ( this.m_bIsMobile )
  174. $J('input:focus').blur();
  175. }
  176. else
  177. {
  178. $ErrorElement.hide();
  179. }
  180. }
  181. };
  182.  
  183.  
  184. //Refresh the catpcha image
  185. CLoginPromptManager.prototype.RefreshCaptcha = function()
  186. {
  187. var _this = this;
  188. $J.post( this.m_strBaseURL + 'refreshcaptcha/', this.GetParameters( {} ) )
  189. .done( function( data ) {
  190. _this.UpdateCaptcha( data.gid );
  191. });
  192. };
  193.  
  194. CLoginPromptManager.prototype.UpdateCaptcha = function( gid )
  195. {
  196. if ( gid != -1 )
  197. {
  198. $J('#captcha_entry').show();
  199. $J('#captchaImg').attr( 'src', this.m_strBaseURL + 'rendercaptcha/?gid='+gid );
  200. this.$LogonFormElement('captcha_text').val('');
  201. }
  202. else
  203. {
  204. $J('#captcha_entry' ).hide();
  205. }
  206. this.m_gidCaptcha = gid;
  207. };
  208.  
  209. CLoginPromptManager.prototype.DoLogin = function()
  210. {
  211. var form = this.m_$LogonForm[0];
  212.  
  213. var username = form.elements['username'].value;
  214. this.m_strUsernameEntered = username;
  215. username = username.replace( /[^\x00-\x7F]/g, '' ); // remove non-standard-ASCII characters
  216. this.m_strUsernameCanonical = username;
  217.  
  218. var password = form.elements['password'].value;
  219. password = password.replace( /[^\x00-\x7F]/g, '' ); // remove non-standard-ASCII characters
  220.  
  221. if ( this.m_bLoginInFlight || password.length == 0 || username.length == 0 )
  222. return;
  223.  
  224. this.m_bLoginInFlight = true;
  225. $J('#login_btn_signin').hide();
  226. $J('#login_btn_wait').show();
  227.  
  228. // reset some state
  229. this.HighlightFailure( '' );
  230.  
  231. var _this = this;
  232. $J.post( this.m_strBaseURL + '', this.GetParameters( { username: username } ) )
  233. .done( $J.proxy( this.OnRSAKeyResponse, this ) )
  234. .fail( function () {
  235.  
  236. _this.m_bLoginInFlight = false;
  237. });
  238. };
  239.  
  240. // used to get mobile client to execute a steammobile URL
  241. CLoginPromptManager.prototype.RunLocalURL = function(url)
  242. {
  243. var $IFrame = $J('<iframe/>', {src: url} );
  244. $J(document.body).append( $IFrame );
  245.  
  246. // take it back out immediately
  247. $IFrame.remove();
  248. };
  249.  
  250. var g_interval = null;
  251.  
  252. // read results from Android or WinRT clients
  253. CLoginPromptManager.prototype.GetValueFromLocalURL = function( url, callback )
  254. {
  255. window.g_status = null;
  256. window.g_data = null;
  257. this.RunLocalURL( url );
  258.  
  259. var timeoutTime = Date.now() + 1000 * 5;
  260.  
  261. if ( g_interval != null )
  262. {
  263. window.clearInterval( g_interval );
  264. g_interval = null;
  265. }
  266.  
  267. // poll regularly (but gently) for an update.
  268. g_interval = window.setInterval( function() {
  269. var status = window.SGHandler.getResultStatus();
  270. if ( status && status != 'busy' )
  271. {
  272. if ( g_interval )
  273. window.clearInterval( g_interval );
  274.  
  275. var value = window.SGHandler.getResultValue();
  276. callback( [ status, value ] );
  277. return;
  278. }
  279. if ( Date.now() > timeoutTime )
  280. {
  281. if ( g_interval )
  282. window.clearInterval( g_interval );
  283. callback( ['error', 'timeout'] );
  284. return;
  285. }
  286. }, 100);
  287. };
  288.  
  289. // this function is invoked by iOS after the steammobile:// url is triggered by GetAuthCode.
  290. // we post an event to the dom to let any login handlers deal with it.
  291. function receiveAuthCode( code )
  292. {
  293. $J(document).trigger( 'SteamMobile_ReceiveAuthCode', [ code ] );
  294. };
  295.  
  296. CLoginPromptManager.prototype.GetAuthCode = function( results, callback )
  297. {
  298. if ( this.m_bIsMobile )
  299. {
  300. // honor manual entry before anything else
  301. var code = $J('#twofactr').val();
  302. if ( code.length > 0 )
  303. {
  304. callback( results, code );
  305. return;
  306. }
  307.  
  308. if ( this.BIsIos() )
  309. {
  310. this.m_sAuthCode = '';
  311. this.RunLocalURL( "steammobile://twofactrtorcode?gid=" + results.token_gid );
  312.  
  313. // this is expected to trigger receiveAuthCode and we'll have this value set by the time it's done
  314. if ( this.m_sAuthCode.length > 0 )
  315. {
  316. callback( results, this.m_sAuthCode );
  317. return;
  318. }
  319. }
  320. else if ( this.BIsAndroid() || this.BIsWinRT() )
  321. {
  322. var result = this.GetValueFromLocalURL('steammobile://twofactrtorcode?gid=' + results.token_gid, function(result) {
  323. if ( result[0] == 'ok' )
  324. {
  325. callback(results, result[1]);
  326. } else {
  327. // this may be in the modal
  328. callback(results, $J('#twofactr').val());
  329. }
  330. });
  331. return;
  332. }
  333.  
  334. // this may be in the modal
  335. callback(results, $J('#twofactr').val());
  336. }
  337. else
  338. {
  339. var authCode = this.m_sAuthCode;
  340. this.m_sAuthCode = '';
  341. callback( results, authCode );
  342. }
  343. };
  344.  
  345.  
  346. CLoginPromptManager.prototype.OnRSAKeyResponse = function( results )
  347. {
  348. if ( results.publickey_mod && results.publickey_exp && results.timestamp )
  349. {
  350. this.GetAuthCode( results , $J.proxy(this.OnAuthCodeResponse, this) );
  351. }
  352. else
  353. {
  354. if ( results.message )
  355. {
  356. this.HighlightFailure( results.message );
  357. }
  358.  
  359. $J('#login_btn_signin').show();
  360. $J('#login_btn_wait').hide();
  361.  
  362. this.m_bLoginInFlight = false;
  363. }
  364. };
  365.  
  366. CLoginPromptManager.prototype.OnAuthCodeResponse = function( results, authCode )
  367. {
  368. var form = this.m_$LogonForm[0];
  369. var pubKey = RSA.getPublicKey(results.publickey_mod, results.publickey_exp);
  370. var username = this.m_strUsernameCanonical;
  371. var password = form.elements['password'].value;
  372. password = password.replace(/[^\x00-\x7F]/g, ''); // remove non-standard-ASCII characters
  373. var encryptedPassword = RSA.encrypt(password, pubKey);
  374.  
  375. var rgParameters = {
  376. password: encryptedPassword,
  377. username: username,
  378. twofactrtorcode: authCode,
  379. emailauth: form.elements['emailauth'] ? form.elements['emailauth'].value : '',
  380. loginfriendlyname: form.elements['loginfriendlyname'] ? form.elements['loginfriendlyname'].value : '',
  381. captchagid: this.m_gidCaptcha,
  382. captcha_text: form.elements['captcha_text'] ? form.elements['captcha_text'].value : '',
  383. emailsteamid: this.m_steamidEmailAuth,
  384. rsatimestamp: results.timestamp,
  385. remember_login: ( form.elements['remember_login'] && form.elements['remember_login'].checked ) ? 'true' : 'false'
  386. };
  387.  
  388. if (this.m_bIsMobile)
  389. rgParameters.oauth_client_id = form.elements['oauth_client_id'].value;
  390.  
  391. var _this = this;
  392. $J.post(this.m_strBaseURL + 'dologin/', this.GetParameters(rgParameters))
  393. .done($J.proxy(this.OnLoginResponse, this))
  394. .fail(function () {
  395. ShowAlertDialog('Error', 'There was a problem communicating with the Steam servers. Please try again later.');
  396.  
  397. $J('#login_btn_signin').show();
  398. $J('#login_btn_wait').hide();
  399. _this.m_bLoginInFlight = false;
  400. });
  401. };
  402.  
  403.  
  404. CLoginPromptManager.prototype.OnLoginResponse = function( results )
  405. {
  406. this.m_bLoginInFlight = false;
  407. var bRetry = true;
  408.  
  409. if ( results.login_complete )
  410. {
  411. if ( this.m_bIsMobile && results.oauth )
  412. {
  413. if( results.redirect_uri )
  414. {
  415. this.m_sOAuthRedirectURI = results.redirect_uri;
  416. }
  417.  
  418. this.$LogonFormElement('oauth' ).val( results.oauth );
  419. bRetry = false;
  420. this.LoginComplete();
  421. return;
  422. }
  423.  
  424. var bRunningTransfer = false;
  425. if ( ( results.transfer_url || results.transfer_urls ) && results.transfer_parameters )
  426. {
  427. bRunningTransfer = true;
  428. this.TransferLogin( results.transfer_urls || [ results.transfer_url ], results.transfer_parameters );
  429. }
  430.  
  431. if ( this.m_bInEmailAuthProcess )
  432. {
  433. this.m_bEmailAuthSuccessful = true;
  434. this.SetEmailAuthModalState( 'success' );
  435. }
  436. else if ( this.m_bIntwofactrtorAuthProcess )
  437. {
  438. this.m_btwofactrtorAuthSuccessful = true;
  439. this.SettwofactrtorAuthModalState( 'success' );
  440. }
  441. else
  442. {
  443. bRetry = false;
  444. if ( !bRunningTransfer )
  445. this.LoginComplete();
  446. }
  447. }
  448. else
  449. {
  450. // if there was some kind of other error while doing email auth or twofactrtor, make sure
  451. // the modals don't get stuck
  452. if ( !results.emailauth_needed && this.m_EmailAuthModal )
  453. this.m_EmailAuthModal.Dismiss();
  454.  
  455. if ( !results.requires_twofactrtor && this.m_twofactrtorModal )
  456. this.m_twofactrtorModal.Dismiss();
  457.  
  458. if ( results.requires_twofactrtor )
  459. {
  460. $J('#captcha_entry').hide();
  461.  
  462. if ( !this.m_bIntwofactrtorAuthProcess )
  463. this.StarttwofactrtorAuthProcess();
  464. else
  465. this.SettwofactrtorAuthModalState( 'incorrectcode' );
  466. }
  467. else if ( results.captcha_needed && results.captcha_gid )
  468. {
  469. this.UpdateCaptcha( results.captcha_gid );
  470. this.m_iIncorrectLoginFailures ++;
  471. }
  472. else if ( results.emailauth_needed )
  473. {
  474. if ( results.emaildomain )
  475. $J('#emailauth_entercode_emaildomain').text( results.emaildomain );
  476.  
  477. if ( results.emailsteamid )
  478. this.m_steamidEmailAuth = results.emailsteamid;
  479.  
  480. if ( !this.m_bInEmailAuthProcess )
  481. this.StartEmailAuthProcess();
  482. else
  483. this.SetEmailAuthModalState( 'incorrectcode' );
  484. }
  485. else if ( results.denied_ipt )
  486. {
  487. ShowDialog( 'Intel® Identity Protection Technology', this.m_$ModalIPT.show() ).always( $J.proxy( this.ClearLoginForm, this ) );
  488. }
  489. else
  490. {
  491. this.m_strUsernameEntered = null;
  492. this.m_strUsernameCanonical = null;
  493. this.m_iIncorrectLoginFailures ++;
  494. }
  495.  
  496. if ( results.message )
  497. {
  498. this.HighlightFailure( results.message );
  499. if ( this.m_bIsMobile && this.m_iIncorrectLoginFailures > 1 && !results.emailauth_needed && !results.bad_captcha )
  500. {
  501. // 2 failed logins not due to Steamguard or captcha, un-obfuscate the password field
  502. $J( '#passwordclearlabel' ).show();
  503. $J( '#steamPassword' ).val('');
  504. $J( '#steamPassword' ).attr( 'type', 'text' );
  505. $J( '#steamPassword' ).attr( 'autocomplete', 'off' );
  506. }
  507. else if ( results.clear_password_field )
  508. {
  509. $J( '#input_password' ).val('');
  510. $J( '#input_password' ).focus();
  511. }
  512.  
  513. }
  514. }
  515. if ( bRetry )
  516. {
  517. $J('#login_btn_signin').show();
  518. $J('#login_btn_wait').hide();
  519. }
  520. };
  521.  
  522. CLoginPromptManager.prototype.ClearLoginForm = function()
  523. {
  524. var rgElements = this.m_$LogonForm[0].elements;
  525. rgElements['username'].value = '';
  526. rgElements['password'].value = '';
  527. if ( rgElements['emailauth'] ) rgElements['emailauth'].value = '';
  528. this.m_steamidEmailAuth = '';
  529.  
  530. // part of the email auth modal
  531. $J('#authcode').value = '';
  532.  
  533. if ( this.m_gidCaptcha )
  534. this.RefreshCaptcha();
  535.  
  536. rgElements['username'].focus();
  537. };
  538.  
  539. CLoginPromptManager.prototype.StartEmailAuthProcess = function()
  540. {
  541. this.m_bInEmailAuthProcess = true;
  542.  
  543. this.SetEmailAuthModalState( 'entercode' );
  544.  
  545. var _this = this;
  546. this.m_EmailAuthModal = ShowDialog( 'Steam Guard', this.m_$ModalAuthCode.show() )
  547. .always( function() {
  548. $J(document.body).append( _this.m_$ModalAuthCode.hide() );
  549. _this.CancelEmailAuthProcess();
  550. _this.m_EmailAuthModal = null;
  551. } );
  552.  
  553. this.m_EmailAuthModal.SetDismissOnBackgroundClick( false );
  554. this.m_EmailAuthModal.SetRemoveContentOnDismissal( false );
  555. $J('#authcode_entry').find('input').focus();
  556. };
  557.  
  558. CLoginPromptManager.prototype.CancelEmailAuthProcess = function()
  559. {
  560. this.m_steamidEmailAuth = '';
  561. if ( this.m_bInEmailAuthProcess )
  562. {
  563. this.m_bInEmailAuthProcess = false;
  564.  
  565. // if the user closed the auth window on the last step, just redirect them like we normally would
  566. if ( this.m_bEmailAuthSuccessful )
  567. this.LoginComplete();
  568. }
  569. };
  570.  
  571. CLoginPromptManager.prototype.TransferLogin = function( rgURLs, parameters )
  572. {
  573. if ( this.m_bLoginTransferInProgress )
  574. return;
  575. this.m_bLoginTransferInProgress = true;
  576.  
  577. var bOnCompleteFired = false;
  578. var _this = this;
  579. var fnOnComplete = function() {
  580. if ( !bOnCompleteFired )
  581. _this.OnTransferComplete();
  582. bOnCompleteFired = true;
  583. };
  584.  
  585. var cResponsesExpected = rgURLs.length;
  586. $J(window).on( 'message', function() {
  587. if ( --cResponsesExpected == 0 )
  588. fnOnComplete();
  589. });
  590.  
  591. for ( var i = 0 ; i < rgURLs.length; i++ )
  592. {
  593. var $IFrame = $J('<iframe>', {id: 'transfer_iframe' } ).hide();
  594. $J(document.body).append( $IFrame );
  595.  
  596. var doc = $IFrame[0].contentWindow.document;
  597. doc.open();
  598. doc.write( '<form method="POST" action="' + rgURLs[i] + '" name="transfer_form">' );
  599. for ( var param in parameters )
  600. {
  601. doc.write( '<input type="hidden" name="' + param + '" value="' + V_EscapeHTML( parameters[param] ) + '">' );
  602. }
  603. doc.write( '</form>' );
  604. doc.write( '<script>window.onload = function(){ document.forms["transfer_form"].submit(); }</script>' );
  605. doc.close();
  606. }
  607.  
  608. // after 10 seconds, give up on waiting for transfer
  609. window.setTimeout( fnOnComplete, 10000 );
  610. };
  611.  
  612. CLoginPromptManager.prototype.OnTransferComplete = function()
  613. {
  614. if ( !this.m_bLoginTransferInProgress )
  615. return;
  616. this.m_bLoginTransferInProgress = false;
  617. if ( !this.m_bInEmailAuthProcess && !this.m_bIntwofactrtorAuthProcess )
  618. this.LoginComplete();
  619. else if ( this.m_bEmailAuthSuccessfulWantToLeave || this.m_btwofactrtorAuthSuccessfulWantToLeave)
  620. this.LoginComplete();
  621. };
  622.  
  623. CLoginPromptManager.prototype.OnEmailAuthSuccessContinue = function()
  624. {
  625. $J('#auth_buttonsets').children().hide();
  626. $J('#auth_buttonset_waiting').show();
  627.  
  628. if ( this.m_bLoginTransferInProgress )
  629. {
  630. this.m_bEmailAuthSuccessfulWantToLeave = true;
  631. }
  632. else
  633. this.LoginComplete();
  634. };
  635.  
  636. CLoginPromptManager.prototype.LoginComplete = function()
  637. {
  638. if ( this.m_fnOnSuccess )
  639. {
  640. this.m_fnOnSuccess();
  641. }
  642. else if ( $J('#openidForm').length )
  643. {
  644. $J('#openidForm').submit();
  645. }
  646. else if ( this.m_strRedirectURL != '' )
  647. {
  648. window.location = this.m_strRedirectURL;
  649. }
  650. else if ( this.m_bIsMobile )
  651. {
  652. if ( document.forms['logon'].elements['oauth'] && ( document.forms['logon'].elements['oauth'].value.length > 0 ) )
  653. {
  654. window.location = this.m_sOAuthRedirectURI + '?' + document.forms['logon'].elements['oauth'].value;
  655. }
  656. }
  657. };
  658.  
  659. CLoginPromptManager.prototype.SubmitAuthCode = function()
  660. {
  661. if ( !v_trim( $J('#authcode').val() ).length )
  662. return;
  663.  
  664. $J('#auth_details_computer_name').css('color', '85847f' ); //TODO
  665. $J('#auth_buttonsets').children().hide();
  666. $J('#auth_buttonset_waiting').show();
  667.  
  668. this.$LogonFormElement( 'loginfriendlyname' ).val( $J('#friendlyname').val() );
  669. this.$LogonFormElement( 'emailauth' ).val( $J('#authcode').val() );
  670.  
  671. this.DoLogin();
  672. };
  673.  
  674. CLoginPromptManager.prototype.SetEmailAuthModalState = function( step )
  675. {
  676. if ( step == 'submit' )
  677. {
  678. this.SubmitAuthCode();
  679. return;
  680. }
  681. else if ( step == 'complete' )
  682. {
  683. this.OnEmailAuthSuccessContinue();
  684. return;
  685. }
  686.  
  687. $J('#auth_messages').children().hide();
  688. $J('#auth_message_' + step ).show();
  689.  
  690. $J('#auth_details_messages').children().hide();
  691. $J('#auth_details_' + step ).show();
  692.  
  693. $J('#auth_buttonsets').children().hide();
  694. $J('#auth_buttonset_' + step ).show();
  695.  
  696. $J('#authcode_help_supportlink').hide();
  697.  
  698. var icon='key';
  699. var bShowAuthcodeEntry = true;
  700. if ( step == 'entercode' )
  701. {
  702. icon = 'mail';
  703. }
  704. else if ( step == 'checkspam' )
  705. {
  706. icon = 'trash';
  707. }
  708. else if ( step == 'success' )
  709. {
  710. icon = 'unlock';
  711. bShowAuthcodeEntry = false;
  712. $J('#success_continue_btn').focus();
  713. this.m_EmailAuthModal.SetDismissOnBackgroundClick( true );
  714. this.m_EmailAuthModal.always( $J.proxy( this.LoginComplete, this ) );
  715. }
  716. else if ( step == 'incorrectcode' )
  717. {
  718. icon = 'lock';
  719. }
  720. else if ( step == 'help' )
  721. {
  722. icon = 'steam';
  723. bShowAuthcodeEntry = false;
  724. $J('#authcode_help_supportlink').show();
  725. }
  726.  
  727. if ( bShowAuthcodeEntry )
  728. {
  729. var $AuthcodeEntry = $J('#authcode_entry');
  730. if ( !$AuthcodeEntry.is(':visible') )
  731. {
  732. $AuthcodeEntry.show().find('input').focus();
  733. }
  734. $J('#auth_details_computer_name').show();
  735. }
  736. else
  737. {
  738. $J('#authcode_entry').hide();
  739. $J('#auth_details_computer_name').hide();
  740. }
  741.  
  742. $J('#auth_icon').attr('class', 'auth_icon auth_icon_' + icon );
  743. };
  744.  
  745. CLoginPromptManager.prototype.StarttwofactrtorAuthProcess = function()
  746. {
  747. this.m_bIntwofactrtorAuthProcess = true;
  748. this.SettwofactrtorAuthModalState( 'entercode' );
  749.  
  750. var _this = this;
  751. this.m_twofactrtorModal = ShowDialog( 'Steam Guard Mobile Authentication', this.m_$Modaltwofactrtor.show() )
  752. .fail( function() { _this.CanceltwofactrtorAuthProcess(); } )
  753. .always( function() {
  754. $J(document.body).append( _this.m_$Modaltwofactrtor.hide() );
  755. _this.m_bIntwofactrtorAuthProcess = false;
  756. _this.m_twofactrtorModal = null;
  757. } );
  758.  
  759. this.m_twofactrtorModal.SetDismissOnBackgroundClick( false );
  760. this.m_twofactrtorModal.SetRemoveContentOnDismissal( false );
  761.  
  762. $J('#twofactr').focus();
  763. };
  764.  
  765.  
  766. CLoginPromptManager.prototype.CanceltwofactrtorAuthProcess = function()
  767. {
  768. this.m_bIntwofactrtorAuthProcess = false;
  769.  
  770. if ( this.m_btwofactrtorAuthSuccessful )
  771. this.LoginComplete();
  772. else
  773. this.ClearLoginForm();
  774. };
  775.  
  776.  
  777. CLoginPromptManager.prototype.OntwofactrtorResetOptionsResponse = function( results )
  778. {
  779. if ( results.success && results.options.sms.allowed )
  780. {
  781. this.m_sPhoneNumberLastDigits = results.options.sms.last_digits;
  782. this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove' ); // Or reset if this.m_btwofactrtorReset
  783. }
  784. else if ( results.success )
  785. {
  786. this.SettwofactrtorAuthModalState( 'selfhelp_nosms' );
  787. }
  788. else
  789. {
  790. this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
  791. $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
  792. }
  793. };
  794.  
  795.  
  796. CLoginPromptManager.prototype.OntwofactrtorRecoveryFailure = function()
  797. {
  798. this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
  799. $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( '' ); // v0v
  800. };
  801.  
  802.  
  803. CLoginPromptManager.prototype.OnStartRemovetwofactrtorResponse = function( results )
  804. {
  805. if ( results.success )
  806. {
  807. this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_entercode' );
  808. }
  809. else
  810. {
  811. this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
  812. $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
  813. }
  814. };
  815.  
  816.  
  817. CLoginPromptManager.prototype.OnRemovetwofactrtorResponse = function( results )
  818. {
  819. if ( results.success )
  820. {
  821. if ( this.m_btwofactrtorReset )
  822. {
  823. this.RunLocalURL( "steammobile://steamguard?op=setsecret&arg1=" + results.replacement_token );
  824. this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_replaced' );
  825. }
  826. else
  827. {
  828. this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_removed' );
  829. }
  830. }
  831. else if ( results.retry )
  832. {
  833. this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_incorrectcode' );
  834. }
  835. else
  836. {
  837. this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
  838. $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
  839. }
  840. };
  841.  
  842.  
  843. CLoginPromptManager.prototype.OnUsetwofactrtorRecoveryCodeResponse = function( results )
  844. {
  845. if ( results.success )
  846. {
  847. this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_removed' );
  848. }
  849. else if ( results.retry )
  850. {
  851. $J( '#login_twofactrtorauth_details_selfhelp_rcode_incorrectcode' ).text( results.message );
  852. this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode' );
  853. }
  854. else if ( results.exhausted )
  855. {
  856. $J( '#login_twofactrtorauth_details_selfhelp_rcode_incorrectcode_exhausted' ).text( results.message );
  857. this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode_exhausted' );
  858. }
  859. else
  860. {
  861. this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
  862. $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
  863. }
  864. };
  865.  
  866.  
  867. CLoginPromptManager.prototype.OntwofactrtorAuthSuccessContinue = function()
  868. {
  869. if ( !this.m_bIsMobile )
  870. {
  871. $J('#login_twofactrtorauth_buttonsets').children().hide();
  872. $J('#login_twofactrtorauth_buttonset_waiting').show();
  873. }
  874.  
  875. if ( this.m_bLoginTransferInProgress )
  876. {
  877. this.m_btwofactrtorAuthSuccessfulWantToLeave = true;
  878. }
  879. else
  880. {
  881. this.LoginComplete();
  882. }
  883. };
  884.  
  885. CLoginPromptManager.prototype.SettwofactrtorAuthModalState = function( step )
  886. {
  887. if ( step == 'submit' )
  888. {
  889. $J('#login_twofactrtor_authcode_entry').hide();
  890. this.SubmittwofactrtorCode();
  891. return;
  892. }
  893. else if ( step == 'success' )
  894. {
  895. this.OntwofactrtorAuthSuccessContinue();
  896. return;
  897. }
  898.  
  899. $J('#login_twofactrtorauth_messages').children().hide();
  900. $J('#login_twofactrtorauth_message_' + step ).show();
  901.  
  902. $J('#login_twofactrtorauth_details_messages').children().hide();
  903. $J('#login_twofactrtorauth_details_' + step ).show();
  904.  
  905. $J('#login_twofactrtorauth_buttonsets').children().hide();
  906. $J('#login_twofactrtorauth_buttonset_' + step ).show();
  907.  
  908. $J('#login_twofactrtor_authcode_help_supportlink').hide();
  909.  
  910. var icon = 'key';
  911. if ( step == 'entercode' )
  912. {
  913. icon = 'phone';
  914. $J('#login_twofactrtor_authcode_entry').show();
  915. $J('#twofactr').val('');
  916. $J('#login_twofactrtorauth_message_entercode_accountname').text( this.m_strUsernameEntered );
  917. $J('#twofactr').focus();
  918. }
  919. else if ( step == 'incorrectcode' )
  920. {
  921. icon = 'lock';
  922. $J('#login_twofactrtor_authcode_entry').show();
  923. $J('#twofactr').val('');
  924. $J('#twofactr').focus();
  925. }
  926. else if ( step == 'selfhelp' )
  927. {
  928. icon = 'steam';
  929. $J('#login_twofactrtor_authcode_entry').hide();
  930.  
  931. if ( !this.m_bIsMobileSteamClient
  932. || this.BIsAndroid() && !this.BIsUserInMobileClientVersionOrNewer( 2, 0, 32 )
  933. || this.BIsIos() && !this.BIsUserInMobileClientVersionOrNewer( 2, 0, 0 )
  934. // no version minimum for Windows phones
  935. )
  936. {
  937. $J( '#login_twofactrtorauth_buttonset_selfhelp div[data-modalstate=selfhelp_sms_reset_start]' ).hide();
  938. }
  939. }
  940. else if ( step == 'selfhelp_sms_remove_start' || step == 'selfhelp_sms_reset_start' )
  941. {
  942. icon = 'steam';
  943. $J('#login_twofactrtor_authcode_entry').hide();
  944.  
  945. $J('#login_twofactrtorauth_messages').children().hide();
  946. $J('#login_twofactrtorauth_details_messages').children().hide();
  947.  
  948. $J('#login_twofactrtorauth_buttonsets').children().hide();
  949. $J('#login_twofactrtorauth_buttonset_waiting').show();
  950.  
  951. this.m_btwofactrtorReset = (step == 'selfhelp_sms_reset_start');
  952.  
  953. $J.post( this.m_strBaseURL + 'getresetoptions/', this.GetParameters( {} ) )
  954. .done( $J.proxy( this.OntwofactrtorResetOptionsResponse, this ) )
  955. .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
  956. }
  957. else if ( step == 'selfhelp_sms_remove' )
  958. {
  959. icon = 'steam';
  960. $J('#login_twofactrtorauth_selfhelp_sms_remove_last_digits').text( this.m_sPhoneNumberLastDigits );
  961. }
  962. else if ( step == 'selfhelp_sms_remove_sendcode' )
  963. {
  964. icon = 'steam';
  965. $J('#login_twofactrtor_authcode_entry').hide();
  966.  
  967. $J('#login_twofactrtorauth_messages').children().hide();
  968. $J('#login_twofactrtorauth_details_messages').children().hide();
  969.  
  970. $J('#login_twofactrtorauth_buttonsets').children().hide();
  971. $J('#login_twofactrtorauth_buttonset_waiting').show();
  972.  
  973. $J.post( this.m_strBaseURL + 'startremovetwofactrtor/', this.GetParameters( {} ) )
  974. .done( $J.proxy( this.OnStartRemovetwofactrtorResponse, this ) )
  975. .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
  976. }
  977. else if ( step == 'selfhelp_sms_remove_entercode' )
  978. {
  979. $J('#login_twofactrtorauth_selfhelp_sms_remove_entercode_last_digits').text( this.m_sPhoneNumberLastDigits );
  980.  
  981. $J('#login_twofactrtor_authcode_entry').show();
  982. $J('#twofactr').val('');
  983. $J('#twofactr').focus();
  984. }
  985. else if ( step == 'selfhelp_sms_remove_checkcode' )
  986. {
  987. $J('#login_twofactrtor_authcode_entry').hide();
  988.  
  989. $J('#login_twofactrtorauth_messages').children().hide();
  990. $J('#login_twofactrtorauth_details_messages').children().hide();
  991.  
  992. $J('#login_twofactrtorauth_buttonsets').children().hide();
  993. $J('#login_twofactrtorauth_buttonset_waiting').show();
  994.  
  995. // Immediately skip to incorrect code step without actually checking it if the user forgot to enter a code.
  996. if ( $J('#twofactr').val().length == 0 )
  997. {
  998. this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_incorrectcode' );
  999. }
  1000. else
  1001. {
  1002. var rgParameters = {
  1003. smscode: $J( '#twofactr' ).val(),
  1004. reset: this.m_btwofactrtorReset ? 1 : 0
  1005. };
  1006.  
  1007. $J.post( this.m_strBaseURL + 'removetwofactrtor/', this.GetParameters( rgParameters ) )
  1008. .done( $J.proxy( this.OnRemovetwofactrtorResponse, this ) )
  1009. .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
  1010. }
  1011. }
  1012. else if ( step == 'selfhelp_sms_remove_incorrectcode' )
  1013. {
  1014. icon = 'lock';
  1015. $J('#login_twofactrtor_authcode_entry').show();
  1016. $J('#twofactr').focus();
  1017. }
  1018. else if ( step == 'selfhelp_twofactrtor_removed' )
  1019. {
  1020. icon = 'unlock';
  1021. $J('#twofactr').val(''); // Make sure the next login doesn't supply a code
  1022. }
  1023. else if ( step == 'selfhelp_twofactrtor_replaced' )
  1024. {
  1025. icon = 'steam';
  1026. $J('#twofactr').val('');
  1027. }
  1028. else if ( step == 'selfhelp_sms_remove_complete' )
  1029. {
  1030. this.m_twofactrtorModal.Dismiss();
  1031. this.m_bIntwofactrtorAuthProcess = false;
  1032. this.DoLogin();
  1033. }
  1034. else if ( step == 'selfhelp_nosms' )
  1035. {
  1036. icon = 'steam';
  1037. $J('#login_twofactrtor_authcode_entry').hide();
  1038. }
  1039. else if ( step == 'selfhelp_rcode' )
  1040. {
  1041. $J('#login_twofactrtor_authcode_entry').show();
  1042. $J('#twofactr').val('');
  1043. $J('#twofactr').focus();
  1044. }
  1045. else if ( step == 'selfhelp_rcode_checkcode' )
  1046. {
  1047. $J('#login_twofactrtor_authcode_entry').hide();
  1048.  
  1049. $J('#login_twofactrtorauth_messages').children().hide();
  1050. $J('#login_twofactrtorauth_details_messages').children().hide();
  1051.  
  1052. $J('#login_twofactrtorauth_buttonsets').children().hide();
  1053. $J('#login_twofactrtorauth_buttonset_waiting').show();
  1054.  
  1055. // Immediately skip to incorrect code step without actually checking it if the user forgot to enter a code.
  1056. if ( $J('#twofactr').val().length == 0 )
  1057. {
  1058. this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode' );
  1059. }
  1060. else
  1061. {
  1062. var rgParameters = { rcode: $J( '#twofactr' ).val() };
  1063.  
  1064. $J.post( this.m_strBaseURL + 'userecoverycode/', this.GetParameters( rgParameters ) )
  1065. .done( $J.proxy( this.OnUsetwofactrtorRecoveryCodeResponse, this ) )
  1066. .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
  1067. }
  1068. }
  1069. else if ( step == 'selfhelp_rcode_incorrectcode' )
  1070. {
  1071. icon = 'lock';
  1072. $J('#login_twofactrtor_authcode_entry').show();
  1073. $J('#twofactr').focus();
  1074. }
  1075. else if ( step == 'selfhelp_couldnthelp' )
  1076. {
  1077. icon = 'steam';
  1078. $J('#login_twofactrtor_authcode_entry').hide();
  1079. }
  1080. else if ( step == 'help' )
  1081. {
  1082. icon = 'steam';
  1083. $J('#login_twofactrtor_authcode_entry').hide();
  1084. $J('#login_twofactrtor_authcode_help_supportlink').show();
  1085. }
  1086. else if ( step == 'selfhelp_failure' )
  1087. {
  1088. icon = 'steam';
  1089. }
  1090.  
  1091. if ( this.m_bIntwofactrtorAuthProcess && this.m_twofactrtorModal )
  1092. {
  1093. this.m_twofactrtorModal.AdjustSizing();
  1094. }
  1095.  
  1096. $J('#login_twofactrtorauth_icon').attr( 'class', 'auth_icon auth_icon_' + icon );
  1097. };
  1098.  
  1099. CLoginPromptManager.prototype.SubmittwofactrtorCode = function()
  1100. {
  1101. this.m_sAuthCode = $J('#twofactr').val();
  1102.  
  1103.  
  1104. $J('#login_twofactrtorauth_messages').children().hide();
  1105. $J('#login_twofactrtorauth_details_messages').children().hide();
  1106.  
  1107. $J('#login_twofactrtorauth_buttonsets').children().hide();
  1108. $J('#login_twofactrtorauth_buttonset_waiting').show();
  1109.  
  1110. this.DoLogin();
  1111. };
  1112.  
  1113. CLoginPromptManager.sm_$Modals = null; // static
  1114. CLoginPromptManager.prototype.InitModalContent = function()
  1115. {
  1116.  
  1117. var $modals = $J('#loginModals');
  1118. if ( $modals.length == 0 )
  1119. {
  1120. // This does not work on Android 2.3, nor does creating the DOM node and
  1121. // setting innerHTML without jQuery. So on the mobile login page, we put
  1122. // the modals into the page directly, but not all pages have that.
  1123. CLoginPromptManager.sm_$Modals = $J( "<div id=\"loginModals\">\r\n\t<div class=\"login_modal loginAuthCodeModal\" style=\"display: none\">\r\n\t\t<form data-ajax=\"false\">\r\n\t\t\t<div class=\"auth_message_area\">\r\n\t\t\t\t<div id=\"auth_icon\" class=\"auth_icon auth_icon_key\">\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_messages\" id=\"auth_messages\">\r\n\t\t\t\t\t<div class=\"auth_message\" id=\"auth_message_entercode\" style=\"display: none;\">\r\n\t\t\t\t\t\t<div class=\"auth_modal_h1\">Hello!<\/div>\r\n\t\t\t\t\t\t<p>We see you're logging in to Steam from a new browser or a new computer. Or maybe it's just been a while...<\/p>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"auth_message\" id=\"auth_message_checkspam\" style=\"display: none;\">\r\n\t\t\t\t\t\t<div class=\"auth_modal_h1\">Mistaken for spam?<\/div>\r\n\t\t\t\t\t\t<p>Did you check your spam folder? If you don't see a recent message from Steam Support in your inbox, try looking there.<\/p>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"auth_message\" id=\"auth_message_success\" style=\"display: none;\">\r\n\t\t\t\t\t\t<div class=\"auth_modal_h1\">Success!<\/div>\r\n\t\t\t\t\t\t<p>You now have access to your Steam account here.<\/p>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"auth_message\" id=\"auth_message_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div class=\"auth_message\" id=\"auth_message_help\" style=\"display: none;\">\r\n\t\t\t\t\t\t<div class=\"auth_modal_h1\">Let us help!<\/div>\r\n\t\t\t\t\t\t<p>Sorry you're having trouble. We know your Steam account is valuable to you, and we're committed to helping you keep access to it in the right hands.<\/p>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div id=\"auth_details_messages\" class=\"auth_details_messages\">\r\n\t\t\t\t<div class=\"auth_details\" id=\"auth_details_entercode\" style=\"display: none;\">\r\n\t\t\t\t\tAs an added account security measure, you\u2019ll need to grant access to this browser by entering the special code we\u2019ve just sent to your email address at <span id=\"emailauth_entercode_emaildomain\"><\/span>.\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_details\" id=\"auth_details_success\" style=\"display: none;\">\r\n\t\t\t\t\tIf this is a public computer, be sure to log out of Steam when you're ready to quit this browser session.\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_details\" id=\"auth_details_help\" style=\"display: none;\">\r\n\t\t\t\t\tPlease contact Steam Support for assistance from a member of our staff. Legitimate claims for help with account access are our number one priority.\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"authcode_entry_area\">\r\n\t\t\t\t<div id=\"authcode_entry\">\r\n\t\t\t\t\t<div class=\"authcode_entry_box\">\r\n\t\t\t\t\t\t<input class=\"authcode_entry_input authcode_placeholder\" id=\"authcode\" type=\"text\" value=\"\"\r\n\t\t\t\t\t\t\t placeholder=\"enter your code here\">\r\n\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div id=\"authcode_help_supportlink\">\r\n\t\t\t\t\t<a href=\"https:\/\/support.steampowered.com\/kb_article.php?ref=4020-ALZM-5519\" data-ajax=\"false\" data-externallink=\"1\">Contact Steam Support for help with account access<\/a>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"modal_buttons\" id=\"auth_buttonsets\">\r\n\t\t\t\t<div class=\"auth_buttonset\" id=\"auth_buttonset_entercode\" style=\"display: none;\">\r\n\t\t\t\t\t<div data-modalstate=\"submit\" class=\"auth_button leftbtn\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">my special access code<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div data-modalstate=\"checkspam\" class=\"auth_button\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">What message?<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">I don't have any message from Steam Support...<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_buttonset\" id=\"auth_buttonset_checkspam\" style=\"display: none;\">\r\n\t\t\t\t\t<div data-modalstate=\"submit\" class=\"auth_button leftbtn\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">Found it!<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">and I've entered my special access code above<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div data-modalstate=\"help\" class=\"auth_button\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">No luck still...<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">I don't have any message from Steam Support...<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_buttonset\" id=\"auth_buttonset_success\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_button auth_button_spacer\">\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<a data-modalstate=\"complete\" class=\"auth_button\" id=\"success_continue_btn\" href=\"javascript:void(0);\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">Proceed to Steam!<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">&nbsp;<br>&nbsp;<\/div>\r\n\t\t\t\t\t<\/a>\r\n\t\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_buttonset\" id=\"auth_buttonset_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t\t<div data-modalstate=\"submit\" class=\"auth_button leftbtn\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">I want to try again<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">and I've re-entered my special access code above<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div data-modalstate=\"help\" class=\"auth_button\">\r\n\t\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_buttonset\" id=\"auth_buttonset_waiting\" style=\"display: none;\">\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div style=\"\" id=\"auth_details_computer_name\" class=\"auth_details_messages\">\r\n\t\t\t\tTo easily recognize this browser among the list of devices Steam Guard has enabled, give the browser a friendly name - at least 6 characters long.\t\t\t\t<div id=\"friendly_name_box\" class=\"friendly_name_box\">\r\n\t\t\t\t\t<input class=\"authcode_entry_input authcode_placeholder\" id=\"friendlyname\" type=\"text\"\r\n\t\t\t\t\t\t placeholder=\"enter a friendly name here\">\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div style=\"display: none;\">\r\n\t\t\t\t<input type=\"submit\">\r\n\t\t\t<\/div>\r\n\t\t<\/form>\r\n\t<\/div>\r\n\r\n\t<div class=\"login_modal loginIPTModal\" style=\"display: none\">\r\n\t\t<div class=\"auth_message_area\">\r\n\t\t\t<div class=\"auth_icon ipt_icon\">\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_messages\">\r\n\t\t\t\t<div class=\"auth_message\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Sorry<\/div>\r\n\t\t\t\t\t<p>This account can't be accessed from this computer without additional authorization.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"auth_details_messages\">\r\n\t\t\t<div class=\"auth_details\">\r\n\t\t\t\tPlease contact Steam Support to have a member of our staff assist you. Legitimate claims for help with account access are our number one priority.\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"authcode_entry_area\">\r\n\t\t<\/div>\r\n\t\t<div class=\"modal_buttons\">\r\n\t\t\t<div class=\"auth_buttonset\" >\r\n\t\t\t\t<a href=\"https:\/\/support.steampowered.com\/kb_article.php?ref=9400-IPAX-9398&auth=e39b5c227cffc8ae65414aba013e5fef\" class=\"auth_button leftbtn\" data-ajax=\"false\" data-externallink=\"1\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Learn more<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">about Intel&reg; Identity Protection Technology<\/div>\r\n\t\t\t\t<\/a>\r\n\t\t\t\t<a href=\"https:\/\/support.steampowered.com\" class=\"auth_button\" data-ajax=\"false\" data-externallink=\"1\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t<\/a>\r\n\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\r\n\r\n\t<div class=\"login_modal logintwofactrtorCodeModal\" style=\"display: none\">\r\n\t\t<form>\r\n\t\t<div class=\"twofactrtorauth_message_area\">\r\n\t\t\t<div id=\"login_twofactrtorauth_icon\" class=\"auth_icon auth_icon_key\">\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_messages\" id=\"login_twofactrtorauth_messages\">\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_entercode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Hello <span id=\"login_twofactrtorauth_message_entercode_accountname\"><\/span>!<\/div>\r\n\t\t\t\t\t<p>This account is currently using a Steam Guard Mobile Authenticator.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Let us help!<\/div>\r\n\t\t\t\t\t<p>Sorry you're having trouble. We know your Steam account is valuable to you, and we're committed to helping you keep access to it in the right hands.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_sms_remove\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Confirm ownership of your account<\/div>\r\n\t\t\t\t\t<p>We'll send a text message containing an account recovery code to your phone number ending in <span id=\"login_twofactrtorauth_selfhelp_sms_remove_last_digits\"><\/span>. Once you enter the code, we will remove the mobile authenticator from your account and you will receive Steam Guard codes via email.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_sms_remove_entercode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Confirm ownership of your account<\/div>\r\n\t\t\t\t\t<p>We have sent a text message containing a confirmation code to your phone number ending in <span id=\"login_twofactrtorauth_selfhelp_sms_remove_entercode_last_digits\"><\/span>. Enter the code below so we can remove the mobile authenticator from your account.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_sms_remove_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_twofactrtor_removed\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Success!<\/div>\r\n\t\t\t\t\t<p>We have removed the mobile authenticator from your account. Next time you log in, you will have to enter a Steam Guard code that is sent to your email address.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_twofactrtor_replaced\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Success!<\/div>\r\n\t\t\t\t\t<p>You can now use this device to get mobile authenticator codes for your account. Any other device that was previously providing authenticator codes for your account will no longer be able to do so.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_nosms\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Do you have the recovery code?<\/div>\r\n\t\t\t\t\t<p>You do not have a phone number associated with your Steam account, so we are unable to verify account ownership via a text message. Do you have the recovery code that you wrote down when you added the mobile authenticator? The recovery code begins with the letter 'R'.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_rcode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Enter your recovery code<\/div>\r\n\t\t\t\t\t<p>Please enter the recovery code in the box below. The recovery code begins with the letter 'R'.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_rcode_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_rcode_incorrectcode_exhausted\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_rcode_message\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Whoops!<\/div>\r\n\t\t\t\t\t<p>Sorry but, <br>that isn't quite right...<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_couldnthelp\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Let us help!<\/div>\r\n\t\t\t\t\t<p>If you have lost access to your mobile device, the mobile phone number associated with your account, and don't have the recovery code that you wrote down when you added the mobile authenticator, then please contact Steam Support for assistance recovering access to your account.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_help\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Let us help!<\/div>\r\n\t\t\t\t\t<p>Sorry you're having trouble. We know your Steam account is valuable to you, and we're committed to helping you keep access to it in the right hands.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"twofactrtorauth_message\" id=\"login_twofactrtorauth_message_selfhelp_failure\" style=\"display: none;\">\r\n\t\t\t\t\t<div class=\"auth_modal_h1\">Sorry!<\/div>\r\n\t\t\t\t\t<p>There was an error encountered while processing your request.<\/p>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div id=\"login_twofactrtorauth_details_messages\" class=\"twofactrtorauth_details_messages\">\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_entercode\" style=\"display: none;\">\r\n\t\t\t\tEnter the current code displayed in the Steam Mobile app:\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_selfhelp\" style=\"display: none;\">\r\n\t\t\t\tIf you have lost your mobile device or uninstalled the Steam app and can no longer receive codes, then you may remove the mobile authenticator from your account. This will reduce the security on your account, so you should add a mobile authenticator to a new mobile device afterwards.\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_help\" style=\"display: none;\">\r\n\t\t\t\tPlease contact Steam Support for assistance from a member of our staff.\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_selfhelp_failure\" style=\"display: none;\">\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_selfhelp_rcode_incorrectcode\" style=\"display: none;\">\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"twofactrtorauth_details\" id=\"login_twofactrtorauth_details_selfhelp_rcode_incorrectcode_exhausted\" style=\"display: none;\">\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"twofactrtorauthcode_entry_area\">\r\n\t\t\t<div id=\"login_twofactrtor_authcode_entry\">\r\n\t\t\t\t<div class=\"twofactrtorauthcode_entry_box\">\r\n\t\t\t\t\t<input class=\"twofactrtorauthcode_entry_input authcode_placeholder\" id=\"twofactr\" type=\"text\"\r\n\t\t\t\t\t\t placeholder=\"enter your code here\" autocomplete=\"off\">\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div id=\"login_twofactrtor_authcode_help_supportlink\">\r\n\t\t\t\t<a href=\"https:\/\/support.steampowered.com\/kb_article.php?ref=4020-ALZM-5519\">\r\n\t\t\t\t\tContact Steam Support for help with account access\t\t\t\t<\/a>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"modal_buttons\" id=\"login_twofactrtorauth_buttonsets\">\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_entercode\" style=\"display: none;\">\r\n\t\t\t\t<div type=\"submit\" class=\"auth_button leftbtn\" data-modalstate=\"submit\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">my authenticator code<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I no longer have access to my Mobile Authenticator codes<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"submit\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">I want to try again<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">and I've re-entered my authenticator code above<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div style=\"clear: left;\"><\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_start\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\" style=\"font-size: 16px;\">Remove authenticator<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">and go back to receiving codes by email<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_sms_reset_start\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Use this device<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">and get authenticator codes on this app<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_sms_remove\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_sendcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">OK!<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">Send me the text message<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_nosms\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">I can't<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">because I no longer have access to that phone number<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_sms_remove_entercode\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_checkcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I entered the code above<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_nosms\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I'm not receiving the text message<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_sms_remove_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_checkcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I re-entered the code. Let's try again.<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_nosms\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I'm not receiving the text message<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_twofactrtor_removed\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_complete\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Log in<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">with the mobile authenticator removed<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_twofactrtor_replaced\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_sms_remove_complete\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Log in<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">to the Steam Mobile app<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_nosms\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_rcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Yes<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I have the recovery code that begins with 'R'<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_couldnthelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">No<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I don't have a code like that<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_rcode\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_rcode_checkcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">my recovery code<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_couldnthelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_rcode_incorrectcode\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button leftbtn\" data-modalstate=\"selfhelp_rcode_checkcode\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Submit<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I re-entered the code. Let's try again.<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_couldnthelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_rcode_incorrectcode_exhausted\" style=\"display: none;\">\r\n\t\t\t\t<div class=\"auth_button\" data-modalstate=\"selfhelp_couldnthelp\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Please help<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">I think I need assistance from Steam Support...<\/div>\r\n\t\t\t\t<\/div>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_selfhelp_couldnthelp\" style=\"display: none;\">\r\n\t\t\t\t<a class=\"auth_button leftbtn\" href=\"https:\/\/help.steampowered.com\/\">\r\n\t\t\t\t\t<div class=\"auth_button_h3\">Contact us<\/div>\r\n\t\t\t\t\t<div class=\"auth_button_h5\">for help with account access<\/div>\r\n\t\t\t\t<\/a>\r\n\t\t\t<\/div>\r\n\t\t\t<div class=\"auth_buttonset\" id=\"login_twofactrtorauth_buttonset_waiting\" style=\"display: none;\">\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div style=\"display: none;\">\r\n\t\t\t<input type=\"submit\">\r\n\t\t<\/div>\r\n\t\t<\/form>\r\n\t<\/div>\r\n<\/div>\r\n" );
  1124. $J('body').append( CLoginPromptManager.sm_$Modals );
  1125. }
  1126. else
  1127. {
  1128. CLoginPromptManager.sm_$Modals = $modals;
  1129. }
  1130. };
  1131.  
  1132. CLoginPromptManager.prototype.GetModalContent = function( strModalType )
  1133. {
  1134. var $ModalContent = CLoginPromptManager.sm_$Modals.find( '.login_modal.' + strModalType );
  1135.  
  1136. if ( this.m_bIsMobileSteamClient )
  1137. {
  1138. $ModalContent.find('a[data-externallink]' ).each( function() {
  1139. $J(this).attr( 'href', 'steammobile://openexternalurl?url=' + $J(this).attr('href') );
  1140. });
  1141. }
  1142.  
  1143. return $ModalContent;
  1144. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement