Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- function CLoginPromptManager( strBaseURL, rgOptions )
- {
- // normalize with trailing slash
- this.m_strBaseURL = strBaseURL + ( strBaseURL.substr(-1) == '/' ? '' : '/' ) + ( this.m_bIsMobile ? 'mobilelogin' : 'login' ) + '/';
- // read options
- rgOptions = rgOptions || {};
- this.m_bIsMobile = rgOptions.bIsMobile || false;
- this.m_strMobileClientType = rgOptions.strMobileClientType || '';
- this.m_strMobileClientVersion = rgOptions.strMobileClientVersion || '';
- this.m_bIsMobileSteamClient = ( this.m_strMobileClientType ? true : false );
- this.m_$LogonForm = $JFromIDOrElement( rgOptions.elLogonForm || document.forms['logon'] );
- this.m_fnOnFailure = rgOptions.fnOnFailure || null;
- this.m_fnOnSuccess = rgOptions.fnOnSuccess || null;
- this.m_strRedirectURL = rgOptions.strRedirectURL || (this.m_bIsMobile ? '' : strBaseURL);
- this.m_strSessionID = rgOptions.strSessionID || null;
- this.m_strUsernameEntered = null;
- this.m_strUsernameCanonical = null;
- if ( rgOptions.gidCaptcha )
- this.UpdateCaptcha( rgOptions.gidCaptcha );
- else
- this.RefreshCaptcha(); // check if needed
- this.m_bLoginInFlight = false;
- this.m_bInEmailAuthProcess = false;
- this.m_bIntwofactrtorAuthProcess = false;
- this.m_twofactrtorModal = null;
- this.m_bEmailAuthSuccessful = false;
- this.m_bLoginTransferInProgress = false;
- this.m_bEmailAuthSuccessfulWantToLeave = false;
- this.m_btwofactrtorAuthSuccessful = false;
- this.m_btwofactrtorAuthSuccessfulWantToLeave = false;
- this.m_sOAuthRedirectURI = 'steammobile://mobileloginsucceeded';
- this.m_sAuthCode = "";
- this.m_sPhoneNumberLastDigits = "??";
- this.m_btwofactrtorReset = false;
- // values we collect from the user
- this.m_steamidEmailAuth = '';
- // record keeping
- this.m_iIncorrectLoginFailures = 0; // mobile reveals password after a couple failures
- var _this = this;
- this.m_$LogonForm.submit( function(e) {
- _this.DoLogin();
- e.preventDefault();
- });
- // find buttons and make them clickable
- $J('#login_btn_signin' ).children('a, button' ).click( function() { _this.DoLogin(); } );
- this.InitModalContent();
- // these modals need to be in the body because we refer to elements by name before they are ready
- this.m_$ModalAuthCode = this.GetModalContent( 'loginAuthCodeModal' );
- this.m_$ModalAuthCode.find('[data-modalstate]' ).each( function() {
- $J(this).click( function() { _this.SetEmailAuthModalState( $J(this).data('modalstate') ); } );
- });
- this.m_$ModalAuthCode.find('form').submit( function(e) {
- _this.SetEmailAuthModalState('submit');
- e.preventDefault();
- });
- this.m_EmailAuthModal = null;
- this.m_$ModalIPT = this.GetModalContent( 'loginIPTModal' );
- this.m_$Modaltwofactrtor = this.GetModalContent( 'logintwofactrtorCodeModal' );
- this.m_$Modaltwofactrtor.find( '[data-modalstate]' ).each( function() {
- $J(this).click( function() { _this.SettwofactrtorAuthModalState( $J(this).data('modalstate') ); } );
- });
- this.m_$Modaltwofactrtor.find( 'form' ).submit( function(e) {
- // Prevent submit if nothing was entered
- if ( $J('#twof').val() != '' )
- {
- // Push the left button
- var $btnLeft = _this.m_$Modaltwofactrtor.find( '.auth_buttonset:visible .auth_button.leftbtn ' );
- $btnLeft.trigger( 'click' );
- }
- e.preventDefault();
- });
- // register to listen to IOS two factor callback
- $J(document).on('SteamMobile_ReceiveAuthCode', function( e, authcode ) {
- _this.m_sAuthCode = authcode;
- });
- $J('#captchaRefreshLink' ).click( $J.proxy( this.RefreshCaptcha, this ) );
- // include some additional scripts we may need
- if ( typeof BigNumber == 'undefined' )
- $J.ajax( { url: 'https://steamcommunity-a.akamaihd.net/public/shared/javascript/crypto/jsbn.js', type: 'get', dataType: 'script', cache: true } );
- if ( typeof RSA == 'undefined' )
- $J.ajax( { url: 'https://steamcommunity-a.akamaihd.net/public/shared/javascript/crypto/rsa.js', type: 'get', dataType: 'script', cache: true } );
- }
- CLoginPromptManager.prototype.BIsIos = function() { return this.m_strMobileClientType == 'ios'; };
- CLoginPromptManager.prototype.BIsAndroid = function() { return this.m_strMobileClientType == 'android'; };
- CLoginPromptManager.prototype.BIsWinRT = function() { return this.m_strMobileClientType == 'winrt'; };
- CLoginPromptManager.prototype.BIsUserInMobileClientVersionOrNewer = function( nMinMajor, nMinMinor, nMinPatch ) {
- if ( (!this.BIsIos() && !this.BIsAndroid() && !this.BIsWinRT() ) || this.m_strMobileClientVersion == '' )
- return false;
- var version = this.m_strMobileClientVersion.match( /(?:(\d+) )?\(?(\d+)\.(\d+)(?:\.(\d+))?\)?/ );
- if ( version && version.length >= 3 )
- {
- var nMajor = parseInt( version[2] );
- var nMinor = parseInt( version[3] );
- var nPatch = parseInt( version[4] );
- return nMajor > nMinMajor || ( nMajor == nMinMajor && ( nMinor > nMinMinor || ( nMinor == nMinMinor && nPatch >= nMinPatch ) ) );
- }
- };
- CLoginPromptManager.prototype.GetParameters = function( rgParams )
- {
- var rgDefaultParams = { 'donotcache': new Date().getTime() };
- if ( this.m_strSessionID )
- rgDefaultParams['sessionid'] = this.m_strSessionID;
- return $J.extend( rgDefaultParams, rgParams );
- };
- CLoginPromptManager.prototype.$LogonFormElement = function( strElementName )
- {
- var $Form = this.m_$LogonForm;
- var elInput = this.m_$LogonForm[0].elements[ strElementName ];
- if ( !elInput )
- {
- var $Input = $J('<input/>', {type: 'hidden', name: strElementName } );
- $Form.append( $Input );
- return $Input;
- }
- else
- {
- return $J( elInput );
- }
- };
- CLoginPromptManager.prototype.HighlightFailure = function( msg )
- {
- if ( this.m_fnOnFailure )
- {
- this.m_fnOnFailure( msg );
- // always blur on mobile so the error can be seen
- if ( this.m_bIsMobile && msg )
- $J('input:focus').blur();
- }
- else
- {
- var $ErrorElement = $J('#error_display');
- if ( msg )
- {
- $ErrorElement.text( msg );
- $ErrorElement.slideDown();
- if ( this.m_bIsMobile )
- $J('input:focus').blur();
- }
- else
- {
- $ErrorElement.hide();
- }
- }
- };
- //Refresh the catpcha image
- CLoginPromptManager.prototype.RefreshCaptcha = function()
- {
- var _this = this;
- $J.post( this.m_strBaseURL + 'refreshcaptcha/', this.GetParameters( {} ) )
- .done( function( data ) {
- _this.UpdateCaptcha( data.gid );
- });
- };
- CLoginPromptManager.prototype.UpdateCaptcha = function( gid )
- {
- if ( gid != -1 )
- {
- $J('#captcha_entry').show();
- $J('#captchaImg').attr( 'src', this.m_strBaseURL + 'rendercaptcha/?gid='+gid );
- this.$LogonFormElement('captcha_text').val('');
- }
- else
- {
- $J('#captcha_entry' ).hide();
- }
- this.m_gidCaptcha = gid;
- };
- CLoginPromptManager.prototype.DoLogin = function()
- {
- var form = this.m_$LogonForm[0];
- var username = form.elements['username'].value;
- this.m_strUsernameEntered = username;
- username = username.replace( /[^\x00-\x7F]/g, '' ); // remove non-standard-ASCII characters
- this.m_strUsernameCanonical = username;
- var password = form.elements['password'].value;
- password = password.replace( /[^\x00-\x7F]/g, '' ); // remove non-standard-ASCII characters
- if ( this.m_bLoginInFlight || password.length == 0 || username.length == 0 )
- return;
- this.m_bLoginInFlight = true;
- $J('#login_btn_signin').hide();
- $J('#login_btn_wait').show();
- // reset some state
- this.HighlightFailure( '' );
- var _this = this;
- $J.post( this.m_strBaseURL + '', this.GetParameters( { username: username } ) )
- .done( $J.proxy( this.OnRSAKeyResponse, this ) )
- .fail( function () {
- _this.m_bLoginInFlight = false;
- });
- };
- // used to get mobile client to execute a steammobile URL
- CLoginPromptManager.prototype.RunLocalURL = function(url)
- {
- var $IFrame = $J('<iframe/>', {src: url} );
- $J(document.body).append( $IFrame );
- // take it back out immediately
- $IFrame.remove();
- };
- var g_interval = null;
- // read results from Android or WinRT clients
- CLoginPromptManager.prototype.GetValueFromLocalURL = function( url, callback )
- {
- window.g_status = null;
- window.g_data = null;
- this.RunLocalURL( url );
- var timeoutTime = Date.now() + 1000 * 5;
- if ( g_interval != null )
- {
- window.clearInterval( g_interval );
- g_interval = null;
- }
- // poll regularly (but gently) for an update.
- g_interval = window.setInterval( function() {
- var status = window.SGHandler.getResultStatus();
- if ( status && status != 'busy' )
- {
- if ( g_interval )
- window.clearInterval( g_interval );
- var value = window.SGHandler.getResultValue();
- callback( [ status, value ] );
- return;
- }
- if ( Date.now() > timeoutTime )
- {
- if ( g_interval )
- window.clearInterval( g_interval );
- callback( ['error', 'timeout'] );
- return;
- }
- }, 100);
- };
- // this function is invoked by iOS after the steammobile:// url is triggered by GetAuthCode.
- // we post an event to the dom to let any login handlers deal with it.
- function receiveAuthCode( code )
- {
- $J(document).trigger( 'SteamMobile_ReceiveAuthCode', [ code ] );
- };
- CLoginPromptManager.prototype.GetAuthCode = function( results, callback )
- {
- if ( this.m_bIsMobile )
- {
- // honor manual entry before anything else
- var code = $J('#twofactr').val();
- if ( code.length > 0 )
- {
- callback( results, code );
- return;
- }
- if ( this.BIsIos() )
- {
- this.m_sAuthCode = '';
- this.RunLocalURL( "steammobile://twofactrtorcode?gid=" + results.token_gid );
- // this is expected to trigger receiveAuthCode and we'll have this value set by the time it's done
- if ( this.m_sAuthCode.length > 0 )
- {
- callback( results, this.m_sAuthCode );
- return;
- }
- }
- else if ( this.BIsAndroid() || this.BIsWinRT() )
- {
- var result = this.GetValueFromLocalURL('steammobile://twofactrtorcode?gid=' + results.token_gid, function(result) {
- if ( result[0] == 'ok' )
- {
- callback(results, result[1]);
- } else {
- // this may be in the modal
- callback(results, $J('#twofactr').val());
- }
- });
- return;
- }
- // this may be in the modal
- callback(results, $J('#twofactr').val());
- }
- else
- {
- var authCode = this.m_sAuthCode;
- this.m_sAuthCode = '';
- callback( results, authCode );
- }
- };
- CLoginPromptManager.prototype.OnRSAKeyResponse = function( results )
- {
- if ( results.publickey_mod && results.publickey_exp && results.timestamp )
- {
- this.GetAuthCode( results , $J.proxy(this.OnAuthCodeResponse, this) );
- }
- else
- {
- if ( results.message )
- {
- this.HighlightFailure( results.message );
- }
- $J('#login_btn_signin').show();
- $J('#login_btn_wait').hide();
- this.m_bLoginInFlight = false;
- }
- };
- CLoginPromptManager.prototype.OnAuthCodeResponse = function( results, authCode )
- {
- var form = this.m_$LogonForm[0];
- var pubKey = RSA.getPublicKey(results.publickey_mod, results.publickey_exp);
- var username = this.m_strUsernameCanonical;
- var password = form.elements['password'].value;
- password = password.replace(/[^\x00-\x7F]/g, ''); // remove non-standard-ASCII characters
- var encryptedPassword = RSA.encrypt(password, pubKey);
- var rgParameters = {
- password: encryptedPassword,
- username: username,
- twofactrtorcode: authCode,
- emailauth: form.elements['emailauth'] ? form.elements['emailauth'].value : '',
- loginfriendlyname: form.elements['loginfriendlyname'] ? form.elements['loginfriendlyname'].value : '',
- captchagid: this.m_gidCaptcha,
- captcha_text: form.elements['captcha_text'] ? form.elements['captcha_text'].value : '',
- emailsteamid: this.m_steamidEmailAuth,
- rsatimestamp: results.timestamp,
- remember_login: ( form.elements['remember_login'] && form.elements['remember_login'].checked ) ? 'true' : 'false'
- };
- if (this.m_bIsMobile)
- rgParameters.oauth_client_id = form.elements['oauth_client_id'].value;
- var _this = this;
- $J.post(this.m_strBaseURL + 'dologin/', this.GetParameters(rgParameters))
- .done($J.proxy(this.OnLoginResponse, this))
- .fail(function () {
- ShowAlertDialog('Error', 'There was a problem communicating with the Steam servers. Please try again later.');
- $J('#login_btn_signin').show();
- $J('#login_btn_wait').hide();
- _this.m_bLoginInFlight = false;
- });
- };
- CLoginPromptManager.prototype.OnLoginResponse = function( results )
- {
- this.m_bLoginInFlight = false;
- var bRetry = true;
- if ( results.login_complete )
- {
- if ( this.m_bIsMobile && results.oauth )
- {
- if( results.redirect_uri )
- {
- this.m_sOAuthRedirectURI = results.redirect_uri;
- }
- this.$LogonFormElement('oauth' ).val( results.oauth );
- bRetry = false;
- this.LoginComplete();
- return;
- }
- var bRunningTransfer = false;
- if ( ( results.transfer_url || results.transfer_urls ) && results.transfer_parameters )
- {
- bRunningTransfer = true;
- this.TransferLogin( results.transfer_urls || [ results.transfer_url ], results.transfer_parameters );
- }
- if ( this.m_bInEmailAuthProcess )
- {
- this.m_bEmailAuthSuccessful = true;
- this.SetEmailAuthModalState( 'success' );
- }
- else if ( this.m_bIntwofactrtorAuthProcess )
- {
- this.m_btwofactrtorAuthSuccessful = true;
- this.SettwofactrtorAuthModalState( 'success' );
- }
- else
- {
- bRetry = false;
- if ( !bRunningTransfer )
- this.LoginComplete();
- }
- }
- else
- {
- // if there was some kind of other error while doing email auth or twofactrtor, make sure
- // the modals don't get stuck
- if ( !results.emailauth_needed && this.m_EmailAuthModal )
- this.m_EmailAuthModal.Dismiss();
- if ( !results.requires_twofactrtor && this.m_twofactrtorModal )
- this.m_twofactrtorModal.Dismiss();
- if ( results.requires_twofactrtor )
- {
- $J('#captcha_entry').hide();
- if ( !this.m_bIntwofactrtorAuthProcess )
- this.StarttwofactrtorAuthProcess();
- else
- this.SettwofactrtorAuthModalState( 'incorrectcode' );
- }
- else if ( results.captcha_needed && results.captcha_gid )
- {
- this.UpdateCaptcha( results.captcha_gid );
- this.m_iIncorrectLoginFailures ++;
- }
- else if ( results.emailauth_needed )
- {
- if ( results.emaildomain )
- $J('#emailauth_entercode_emaildomain').text( results.emaildomain );
- if ( results.emailsteamid )
- this.m_steamidEmailAuth = results.emailsteamid;
- if ( !this.m_bInEmailAuthProcess )
- this.StartEmailAuthProcess();
- else
- this.SetEmailAuthModalState( 'incorrectcode' );
- }
- else if ( results.denied_ipt )
- {
- ShowDialog( 'Intel® Identity Protection Technology', this.m_$ModalIPT.show() ).always( $J.proxy( this.ClearLoginForm, this ) );
- }
- else
- {
- this.m_strUsernameEntered = null;
- this.m_strUsernameCanonical = null;
- this.m_iIncorrectLoginFailures ++;
- }
- if ( results.message )
- {
- this.HighlightFailure( results.message );
- if ( this.m_bIsMobile && this.m_iIncorrectLoginFailures > 1 && !results.emailauth_needed && !results.bad_captcha )
- {
- // 2 failed logins not due to Steamguard or captcha, un-obfuscate the password field
- $J( '#passwordclearlabel' ).show();
- $J( '#steamPassword' ).val('');
- $J( '#steamPassword' ).attr( 'type', 'text' );
- $J( '#steamPassword' ).attr( 'autocomplete', 'off' );
- }
- else if ( results.clear_password_field )
- {
- $J( '#input_password' ).val('');
- $J( '#input_password' ).focus();
- }
- }
- }
- if ( bRetry )
- {
- $J('#login_btn_signin').show();
- $J('#login_btn_wait').hide();
- }
- };
- CLoginPromptManager.prototype.ClearLoginForm = function()
- {
- var rgElements = this.m_$LogonForm[0].elements;
- rgElements['username'].value = '';
- rgElements['password'].value = '';
- if ( rgElements['emailauth'] ) rgElements['emailauth'].value = '';
- this.m_steamidEmailAuth = '';
- // part of the email auth modal
- $J('#authcode').value = '';
- if ( this.m_gidCaptcha )
- this.RefreshCaptcha();
- rgElements['username'].focus();
- };
- CLoginPromptManager.prototype.StartEmailAuthProcess = function()
- {
- this.m_bInEmailAuthProcess = true;
- this.SetEmailAuthModalState( 'entercode' );
- var _this = this;
- this.m_EmailAuthModal = ShowDialog( 'Steam Guard', this.m_$ModalAuthCode.show() )
- .always( function() {
- $J(document.body).append( _this.m_$ModalAuthCode.hide() );
- _this.CancelEmailAuthProcess();
- _this.m_EmailAuthModal = null;
- } );
- this.m_EmailAuthModal.SetDismissOnBackgroundClick( false );
- this.m_EmailAuthModal.SetRemoveContentOnDismissal( false );
- $J('#authcode_entry').find('input').focus();
- };
- CLoginPromptManager.prototype.CancelEmailAuthProcess = function()
- {
- this.m_steamidEmailAuth = '';
- if ( this.m_bInEmailAuthProcess )
- {
- this.m_bInEmailAuthProcess = false;
- // if the user closed the auth window on the last step, just redirect them like we normally would
- if ( this.m_bEmailAuthSuccessful )
- this.LoginComplete();
- }
- };
- CLoginPromptManager.prototype.TransferLogin = function( rgURLs, parameters )
- {
- if ( this.m_bLoginTransferInProgress )
- return;
- this.m_bLoginTransferInProgress = true;
- var bOnCompleteFired = false;
- var _this = this;
- var fnOnComplete = function() {
- if ( !bOnCompleteFired )
- _this.OnTransferComplete();
- bOnCompleteFired = true;
- };
- var cResponsesExpected = rgURLs.length;
- $J(window).on( 'message', function() {
- if ( --cResponsesExpected == 0 )
- fnOnComplete();
- });
- for ( var i = 0 ; i < rgURLs.length; i++ )
- {
- var $IFrame = $J('<iframe>', {id: 'transfer_iframe' } ).hide();
- $J(document.body).append( $IFrame );
- var doc = $IFrame[0].contentWindow.document;
- doc.open();
- doc.write( '<form method="POST" action="' + rgURLs[i] + '" name="transfer_form">' );
- for ( var param in parameters )
- {
- doc.write( '<input type="hidden" name="' + param + '" value="' + V_EscapeHTML( parameters[param] ) + '">' );
- }
- doc.write( '</form>' );
- doc.write( '<script>window.onload = function(){ document.forms["transfer_form"].submit(); }</script>' );
- doc.close();
- }
- // after 10 seconds, give up on waiting for transfer
- window.setTimeout( fnOnComplete, 10000 );
- };
- CLoginPromptManager.prototype.OnTransferComplete = function()
- {
- if ( !this.m_bLoginTransferInProgress )
- return;
- this.m_bLoginTransferInProgress = false;
- if ( !this.m_bInEmailAuthProcess && !this.m_bIntwofactrtorAuthProcess )
- this.LoginComplete();
- else if ( this.m_bEmailAuthSuccessfulWantToLeave || this.m_btwofactrtorAuthSuccessfulWantToLeave)
- this.LoginComplete();
- };
- CLoginPromptManager.prototype.OnEmailAuthSuccessContinue = function()
- {
- $J('#auth_buttonsets').children().hide();
- $J('#auth_buttonset_waiting').show();
- if ( this.m_bLoginTransferInProgress )
- {
- this.m_bEmailAuthSuccessfulWantToLeave = true;
- }
- else
- this.LoginComplete();
- };
- CLoginPromptManager.prototype.LoginComplete = function()
- {
- if ( this.m_fnOnSuccess )
- {
- this.m_fnOnSuccess();
- }
- else if ( $J('#openidForm').length )
- {
- $J('#openidForm').submit();
- }
- else if ( this.m_strRedirectURL != '' )
- {
- window.location = this.m_strRedirectURL;
- }
- else if ( this.m_bIsMobile )
- {
- if ( document.forms['logon'].elements['oauth'] && ( document.forms['logon'].elements['oauth'].value.length > 0 ) )
- {
- window.location = this.m_sOAuthRedirectURI + '?' + document.forms['logon'].elements['oauth'].value;
- }
- }
- };
- CLoginPromptManager.prototype.SubmitAuthCode = function()
- {
- if ( !v_trim( $J('#authcode').val() ).length )
- return;
- $J('#auth_details_computer_name').css('color', '85847f' ); //TODO
- $J('#auth_buttonsets').children().hide();
- $J('#auth_buttonset_waiting').show();
- this.$LogonFormElement( 'loginfriendlyname' ).val( $J('#friendlyname').val() );
- this.$LogonFormElement( 'emailauth' ).val( $J('#authcode').val() );
- this.DoLogin();
- };
- CLoginPromptManager.prototype.SetEmailAuthModalState = function( step )
- {
- if ( step == 'submit' )
- {
- this.SubmitAuthCode();
- return;
- }
- else if ( step == 'complete' )
- {
- this.OnEmailAuthSuccessContinue();
- return;
- }
- $J('#auth_messages').children().hide();
- $J('#auth_message_' + step ).show();
- $J('#auth_details_messages').children().hide();
- $J('#auth_details_' + step ).show();
- $J('#auth_buttonsets').children().hide();
- $J('#auth_buttonset_' + step ).show();
- $J('#authcode_help_supportlink').hide();
- var icon='key';
- var bShowAuthcodeEntry = true;
- if ( step == 'entercode' )
- {
- icon = 'mail';
- }
- else if ( step == 'checkspam' )
- {
- icon = 'trash';
- }
- else if ( step == 'success' )
- {
- icon = 'unlock';
- bShowAuthcodeEntry = false;
- $J('#success_continue_btn').focus();
- this.m_EmailAuthModal.SetDismissOnBackgroundClick( true );
- this.m_EmailAuthModal.always( $J.proxy( this.LoginComplete, this ) );
- }
- else if ( step == 'incorrectcode' )
- {
- icon = 'lock';
- }
- else if ( step == 'help' )
- {
- icon = 'steam';
- bShowAuthcodeEntry = false;
- $J('#authcode_help_supportlink').show();
- }
- if ( bShowAuthcodeEntry )
- {
- var $AuthcodeEntry = $J('#authcode_entry');
- if ( !$AuthcodeEntry.is(':visible') )
- {
- $AuthcodeEntry.show().find('input').focus();
- }
- $J('#auth_details_computer_name').show();
- }
- else
- {
- $J('#authcode_entry').hide();
- $J('#auth_details_computer_name').hide();
- }
- $J('#auth_icon').attr('class', 'auth_icon auth_icon_' + icon );
- };
- CLoginPromptManager.prototype.StarttwofactrtorAuthProcess = function()
- {
- this.m_bIntwofactrtorAuthProcess = true;
- this.SettwofactrtorAuthModalState( 'entercode' );
- var _this = this;
- this.m_twofactrtorModal = ShowDialog( 'Steam Guard Mobile Authentication', this.m_$Modaltwofactrtor.show() )
- .fail( function() { _this.CanceltwofactrtorAuthProcess(); } )
- .always( function() {
- $J(document.body).append( _this.m_$Modaltwofactrtor.hide() );
- _this.m_bIntwofactrtorAuthProcess = false;
- _this.m_twofactrtorModal = null;
- } );
- this.m_twofactrtorModal.SetDismissOnBackgroundClick( false );
- this.m_twofactrtorModal.SetRemoveContentOnDismissal( false );
- $J('#twofactr').focus();
- };
- CLoginPromptManager.prototype.CanceltwofactrtorAuthProcess = function()
- {
- this.m_bIntwofactrtorAuthProcess = false;
- if ( this.m_btwofactrtorAuthSuccessful )
- this.LoginComplete();
- else
- this.ClearLoginForm();
- };
- CLoginPromptManager.prototype.OntwofactrtorResetOptionsResponse = function( results )
- {
- if ( results.success && results.options.sms.allowed )
- {
- this.m_sPhoneNumberLastDigits = results.options.sms.last_digits;
- this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove' ); // Or reset if this.m_btwofactrtorReset
- }
- else if ( results.success )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_nosms' );
- }
- else
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
- $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
- }
- };
- CLoginPromptManager.prototype.OntwofactrtorRecoveryFailure = function()
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
- $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( '' ); // v0v
- };
- CLoginPromptManager.prototype.OnStartRemovetwofactrtorResponse = function( results )
- {
- if ( results.success )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_entercode' );
- }
- else
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
- $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
- }
- };
- CLoginPromptManager.prototype.OnRemovetwofactrtorResponse = function( results )
- {
- if ( results.success )
- {
- if ( this.m_btwofactrtorReset )
- {
- this.RunLocalURL( "steammobile://steamguard?op=setsecret&arg1=" + results.replacement_token );
- this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_replaced' );
- }
- else
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_removed' );
- }
- }
- else if ( results.retry )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_incorrectcode' );
- }
- else
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
- $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
- }
- };
- CLoginPromptManager.prototype.OnUsetwofactrtorRecoveryCodeResponse = function( results )
- {
- if ( results.success )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_twofactrtor_removed' );
- }
- else if ( results.retry )
- {
- $J( '#login_twofactrtorauth_details_selfhelp_rcode_incorrectcode' ).text( results.message );
- this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode' );
- }
- else if ( results.exhausted )
- {
- $J( '#login_twofactrtorauth_details_selfhelp_rcode_incorrectcode_exhausted' ).text( results.message );
- this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode_exhausted' );
- }
- else
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_failure' );
- $J( '#login_twofactrtorauth_details_selfhelp_failure' ).text( results.message );
- }
- };
- CLoginPromptManager.prototype.OntwofactrtorAuthSuccessContinue = function()
- {
- if ( !this.m_bIsMobile )
- {
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- }
- if ( this.m_bLoginTransferInProgress )
- {
- this.m_btwofactrtorAuthSuccessfulWantToLeave = true;
- }
- else
- {
- this.LoginComplete();
- }
- };
- CLoginPromptManager.prototype.SettwofactrtorAuthModalState = function( step )
- {
- if ( step == 'submit' )
- {
- $J('#login_twofactrtor_authcode_entry').hide();
- this.SubmittwofactrtorCode();
- return;
- }
- else if ( step == 'success' )
- {
- this.OntwofactrtorAuthSuccessContinue();
- return;
- }
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_message_' + step ).show();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_details_' + step ).show();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_' + step ).show();
- $J('#login_twofactrtor_authcode_help_supportlink').hide();
- var icon = 'key';
- if ( step == 'entercode' )
- {
- icon = 'phone';
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').val('');
- $J('#login_twofactrtorauth_message_entercode_accountname').text( this.m_strUsernameEntered );
- $J('#twofactr').focus();
- }
- else if ( step == 'incorrectcode' )
- {
- icon = 'lock';
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').val('');
- $J('#twofactr').focus();
- }
- else if ( step == 'selfhelp' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- if ( !this.m_bIsMobileSteamClient
- || this.BIsAndroid() && !this.BIsUserInMobileClientVersionOrNewer( 2, 0, 32 )
- || this.BIsIos() && !this.BIsUserInMobileClientVersionOrNewer( 2, 0, 0 )
- // no version minimum for Windows phones
- )
- {
- $J( '#login_twofactrtorauth_buttonset_selfhelp div[data-modalstate=selfhelp_sms_reset_start]' ).hide();
- }
- }
- else if ( step == 'selfhelp_sms_remove_start' || step == 'selfhelp_sms_reset_start' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- this.m_btwofactrtorReset = (step == 'selfhelp_sms_reset_start');
- $J.post( this.m_strBaseURL + 'getresetoptions/', this.GetParameters( {} ) )
- .done( $J.proxy( this.OntwofactrtorResetOptionsResponse, this ) )
- .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
- }
- else if ( step == 'selfhelp_sms_remove' )
- {
- icon = 'steam';
- $J('#login_twofactrtorauth_selfhelp_sms_remove_last_digits').text( this.m_sPhoneNumberLastDigits );
- }
- else if ( step == 'selfhelp_sms_remove_sendcode' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- $J.post( this.m_strBaseURL + 'startremovetwofactrtor/', this.GetParameters( {} ) )
- .done( $J.proxy( this.OnStartRemovetwofactrtorResponse, this ) )
- .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
- }
- else if ( step == 'selfhelp_sms_remove_entercode' )
- {
- $J('#login_twofactrtorauth_selfhelp_sms_remove_entercode_last_digits').text( this.m_sPhoneNumberLastDigits );
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').val('');
- $J('#twofactr').focus();
- }
- else if ( step == 'selfhelp_sms_remove_checkcode' )
- {
- $J('#login_twofactrtor_authcode_entry').hide();
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- // Immediately skip to incorrect code step without actually checking it if the user forgot to enter a code.
- if ( $J('#twofactr').val().length == 0 )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_sms_remove_incorrectcode' );
- }
- else
- {
- var rgParameters = {
- smscode: $J( '#twofactr' ).val(),
- reset: this.m_btwofactrtorReset ? 1 : 0
- };
- $J.post( this.m_strBaseURL + 'removetwofactrtor/', this.GetParameters( rgParameters ) )
- .done( $J.proxy( this.OnRemovetwofactrtorResponse, this ) )
- .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
- }
- }
- else if ( step == 'selfhelp_sms_remove_incorrectcode' )
- {
- icon = 'lock';
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').focus();
- }
- else if ( step == 'selfhelp_twofactrtor_removed' )
- {
- icon = 'unlock';
- $J('#twofactr').val(''); // Make sure the next login doesn't supply a code
- }
- else if ( step == 'selfhelp_twofactrtor_replaced' )
- {
- icon = 'steam';
- $J('#twofactr').val('');
- }
- else if ( step == 'selfhelp_sms_remove_complete' )
- {
- this.m_twofactrtorModal.Dismiss();
- this.m_bIntwofactrtorAuthProcess = false;
- this.DoLogin();
- }
- else if ( step == 'selfhelp_nosms' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- }
- else if ( step == 'selfhelp_rcode' )
- {
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').val('');
- $J('#twofactr').focus();
- }
- else if ( step == 'selfhelp_rcode_checkcode' )
- {
- $J('#login_twofactrtor_authcode_entry').hide();
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- // Immediately skip to incorrect code step without actually checking it if the user forgot to enter a code.
- if ( $J('#twofactr').val().length == 0 )
- {
- this.SettwofactrtorAuthModalState( 'selfhelp_rcode_incorrectcode' );
- }
- else
- {
- var rgParameters = { rcode: $J( '#twofactr' ).val() };
- $J.post( this.m_strBaseURL + 'userecoverycode/', this.GetParameters( rgParameters ) )
- .done( $J.proxy( this.OnUsetwofactrtorRecoveryCodeResponse, this ) )
- .fail( $J.proxy( this.OntwofactrtorRecoveryFailure, this ) );
- }
- }
- else if ( step == 'selfhelp_rcode_incorrectcode' )
- {
- icon = 'lock';
- $J('#login_twofactrtor_authcode_entry').show();
- $J('#twofactr').focus();
- }
- else if ( step == 'selfhelp_couldnthelp' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- }
- else if ( step == 'help' )
- {
- icon = 'steam';
- $J('#login_twofactrtor_authcode_entry').hide();
- $J('#login_twofactrtor_authcode_help_supportlink').show();
- }
- else if ( step == 'selfhelp_failure' )
- {
- icon = 'steam';
- }
- if ( this.m_bIntwofactrtorAuthProcess && this.m_twofactrtorModal )
- {
- this.m_twofactrtorModal.AdjustSizing();
- }
- $J('#login_twofactrtorauth_icon').attr( 'class', 'auth_icon auth_icon_' + icon );
- };
- CLoginPromptManager.prototype.SubmittwofactrtorCode = function()
- {
- this.m_sAuthCode = $J('#twofactr').val();
- $J('#login_twofactrtorauth_messages').children().hide();
- $J('#login_twofactrtorauth_details_messages').children().hide();
- $J('#login_twofactrtorauth_buttonsets').children().hide();
- $J('#login_twofactrtorauth_buttonset_waiting').show();
- this.DoLogin();
- };
- CLoginPromptManager.sm_$Modals = null; // static
- CLoginPromptManager.prototype.InitModalContent = function()
- {
- var $modals = $J('#loginModals');
- if ( $modals.length == 0 )
- {
- // This does not work on Android 2.3, nor does creating the DOM node and
- // setting innerHTML without jQuery. So on the mobile login page, we put
- // the modals into the page directly, but not all pages have that.
- 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\"> <br> <\/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® 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" );
- $J('body').append( CLoginPromptManager.sm_$Modals );
- }
- else
- {
- CLoginPromptManager.sm_$Modals = $modals;
- }
- };
- CLoginPromptManager.prototype.GetModalContent = function( strModalType )
- {
- var $ModalContent = CLoginPromptManager.sm_$Modals.find( '.login_modal.' + strModalType );
- if ( this.m_bIsMobileSteamClient )
- {
- $ModalContent.find('a[data-externallink]' ).each( function() {
- $J(this).attr( 'href', 'steammobile://openexternalurl?url=' + $J(this).attr('href') );
- });
- }
- return $ModalContent;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement