-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Two factor authentication zh TW
Steam含有雙重驗證系統,在執行與帳號相關的行為時,需要確認額外的資料。 您可以閱讀這裡以及這裡來深入了解相關資訊。 本頁面主要介紹雙重驗證系統,與我們對它的整合方案,即ASF雙重驗證。
不論您是否使用ASF雙重驗證,ASF都包含正確的邏輯,且完全了解受Steam雙重驗證保護的帳號。 它會在需要時,向您請求所需的詳細資訊(例如在登入期間)。 雖然您能夠手動提供這些資訊,但某些ASF的功能(例如MatchActively)會需要ASF雙重驗證才能在您的Bot帳號上操作,因為它們必須在ASF需要時自動回應雙重驗證的行為。
ASF雙重驗證是一個內建模組,負責為ASF程序提供雙重驗證功能,例如生成權杖及接受交易確認。 它有多種運作方式,可以是獨立運作,或是複製您現有驗證器內的詳細資訊(使您能夠同時使用原有的驗證器與ASF雙重驗證)。
您可以執行2fa指令來驗證您的Bot帳號是否已啟用ASF雙重驗證。 除非您已設定了ASF雙重驗證,否則所有標準2fa指令都沒有作用,也就是說,對於需要此模組的進階功能也無法運作。
有很多方式能讓ASF雙重驗證發揮作用,在這裡,我們依據了您的當前情形來提供一些建議:
- 若您當前使用的是使您能夠輕易地匯出雙重驗證詳細資料的非官方的第三方應用程式,則只需將它們匯入至ASF中即可。
- 若您當前使用的是官方應用程式,且您也不在意重置您的雙重驗證憑證,最好的方式就是停用雙重驗證,然後再透過聯合驗證器來建立一個新的雙重驗證憑證,這會使您能夠同時使用官方應用程式及ASF雙重驗證。 這個方法是最好的方式,不需要Root或進階知識,只需要依此處的指示操作即可。
- 若您當前使用的是官方應用程式,但您並不想要重置您的雙重驗證憑證,那麼您的選擇並不多。通常,您會需要Root並執行一些額外操作來匯入資訊,甚至也有可能會完全無法使用。
- 若您當前尚未使用雙重驗證,且您並不在意使用何種程式管理,我們建議您使用獨立驗證器來管理ASF雙重驗證;或是結合官方應用程式來使用聯合驗證器(與上述建議相同)。
我們將在下方討論所有可供使用的方式,及已知方法。
ASF提供了官方MobileAuthenticator外掛程式,進一步擴充ASF雙重驗證的功能,使您可以完全重新開始連結一個新的雙重驗證驗證器。 若您無法或不願意使用其他工具,且不介意將ASF雙重驗證做為主要(也可能是唯一)的驗證器,這可能會對您很有幫助。 建立的過程也適用於聯合驗證器,在這種情形中,您的驗證器會在兩處共存⸺兩者皆會生成相同的驗證碼,也能進行相同的確認。
不論您是否打算將ASF用作獨立或聯合驗證器,您都必須進行這些初始化的步驟:
- 為目標帳號建立ASF Bot,啟動,並登入它,您可能已經先完成了。
- 在這裡將能夠正常使用的手機號碼,綁定至給Bot使用的帳號上。 這將使您能夠在需要時收到簡訊代碼並恢復帳號,但這並非強制措施。 這個步驟在任何情形下皆非必要,但,我們建議您這麼做,除非您知道自己在做什麼。
- 確保您的帳號現在並未啟用著雙重驗證,如果有,請先停用它。 這將會讓您的帳號進入暫時性的交易代管,且無法被跳過,只有匯入過程時才能跳過。
- 執行
2fainit [Bot]指令,將[Bot]取代成您的Bot的名稱。
假設您得到成功的回應,就會發生下列兩件事:
- ASF會在您的
config資料夾中生成一個新的<Bot>.maFile.PENDING檔案。 - Steam會向您為上述帳號綁定的手機號碼傳送一封簡訊。 若您未設定電話號碼,那麼將改為傳送電子郵件至您帳號所設定的電子郵件地址中。
驗證器的詳細資料還尚未生效,但如果您願意,您可以查看生成的檔案。 若您希望有個雙重保險,那麼,您可以在此時記下恢復代碼。 接下來的步驟,將取決於您的使用情境。
若您想要使用ASF做為您主要的(或甚至是唯一的)驗證器,您現在就必須執行下列最後的收尾步驟:
- 執行
2fafinalize [Bot] <ActivationCode>指令,將[Bot]取代成您的Bot的名稱;<ActivationCode>取代成您在上個步驟中,經由簡訊或電子郵件所收到的驗證碼。
若您想要在ASF及官方的Steam行動裝置應用程式中使用相同的驗證器,那麼您現在需要執行下列更複雜的步驟:
- 忽略您在前一個步驟中所收到的簡訊或電子郵件。
- 若您還未安裝Steam行動裝置應用程式,請安裝,然後打開它。 前往Steam Guard頁面,並遵循應用程式的指示,建立一個新的驗證器。
- 在您於行動裝置應用程式中建立驗證器,並確認能夠使用後,回到ASF。 Now, instead of finalization, we only need to inform ASF that mobile app already activated our previously-generated details:
- Wait until the next 2FA code is shown in the Steam mobile app, and use the command
2fafinalized [Bot] <2FACodeFromApp>replacing[Bot]with your bot's name and<2FACodeFromApp>with the code you currently see in the Steam mobile app. If the code generated by ASF and the code you provided are equal, ASF will assume that an authenticator was added correctly and proceed with importing your newly created authenticator. - 我們強烈建議您使用上述方式,來確保您的憑證是有效的。 但是,若您不想(或無法)檢查兩者的代碼是否相同,且您也十分清楚您正在做什麼,您可以改用
2fafinalizedforce [Bot]指令,並將[Bot]取代成您的Bot的名稱。 ASF將會認為驗證器已被成功加入,並繼續匯入您新建立的驗證器。
假設一切運作正常,先前生成的<Bot>.maFile.PENDING檔案會被重新命名成<Bot>.maFile.NEW。 這代表您的雙重驗證憑證現在是有效且正確的了。 我們建議您建立一份備份檔,並儲存在安全的地方。 In addition to that, if you've decided to use standalone authenticator, then we recommend you to open the file in your editor of choice and write down the revocation_code, which will allow you to, as the name implies, revoke the authenticator in case you lose it. In joint-authenticator method, you should've already done that in Steam mobile app, but feel free to do the same in case you need to.
In regards to technical details, the generated maFile includes all details that we've received from the Steam server during linking the authenticator, and in addition to that, the device_id field, which may be needed for other (third-party) authenticators, if you ever decide to import that maFile into them.
一旦完成上述流程,ASF就會自動匯入您的驗證器。至此2fa等其他相關指令,現應已對您將驗證器連結到的Bot生效。 We recommend you to verify that.
匯入過程需要您已經擁有並綁定了受到ASF支援的可用驗證器。 We have instructions for a few different official and unofficial sources of 2FA, on top of manual method which allows you to provide required credentials yourself. Please note that those instructions should be used only if you're already using given solution - since process here involves third-party apps and tools, we do not recommend using them, and we're mentioning it exclusively for people that already decided to use them and would like to import generated details into ASF 2FA.
以下所有指南都需要您已擁有上述工具/應用程式中在運作且可供使用的驗證器。 若您匯入了無效的資料,ASF雙重驗證會無法正常運作,因此在嘗試匯入前,請確認您的驗證器能夠正常運作。 這包含測試並驗證下列驗證器功能是否能正常運作:
- 您能生成權杖,且Steam網路接受這些權杖
- 您能生成權杖,且Steam網路接受這些權杖
- You can react to those confirmations, and they're properly recognized by Steam network as confirmed/rejected
Ensure that your authenticator works by checking if above actions work - if they don't, then they won't work in ASF either.
In general for importing authenticator from your Android phone you will need root access. 下列說明需要您擁有對Android修改的大量知識,我們無法在這邊詳細解釋每個步驟,請造訪XDA或查詢其他網站,以獲得下列說明的額外資訊及幫助。
Assuming you have official Steam app working and operational (requires rooting your device):
- 安裝Magisk,並在設定中啟用Zygisk。
- 安裝LSPosed (for Zygisk),並確保它能夠運作。
- 安裝SteamGuardExtractor的LSPosed模組,並在LSPosed的設定中啟用它。
- 強制終止Steam應用程式,然後打開它,一個含有擷取出的詳細資訊的視窗應該會彈出,點擊複製。
現在您已成功擷取出所需的詳細資訊了,可以將模組停用以防之後每次執行時都會顯示提示視窗,然後複製您想要使用ASF雙重驗證帳號的shared_secret及identity_secret的值,並貼到一個擁有下列結構的新的文字檔中:
{
"shared_secret": "STRING",
"identity_secret": "STRING"
}將STRING值取代成擷取出的詳細資料中的對應私鑰。 完成後,將檔案重新命名成BotName.maFile,且BotName是您要使用ASF雙重驗證的Bot的名稱,然後將這份檔案放進ASF的config資料夾中(若您還未放入)。
Launch ASF, which should notice your file and import it. Assuming that you've imported the correct file with valid secrets, everything should work properly, which you can verify by using 2fa commands. 若您做錯了,隨時可以刪除Bot.db來重新開始。
若您已有執行於SDA中的驗證器,您應該已注意到maFiles資料夾中有steamID.maFile檔案。 確保maFile是未加密的格式,因為ASF無法解密SDA檔案⸺未加密的檔案應以{字元開頭,並以}字元結尾。 如果需要,您可以先在SDA的設定中移除加密,然後在您完成使用後重新啟用。 在檔案變成未加密的形式後,將它複製到ASF的config資料夾中。
現在您可以將ASF的config資料夾中的steamID.maFile檔案重新命名成BotName.maFile,其中BotName是您要加入ASF雙重驗證的Bot名稱。 或者您亦可保持原樣,ASF會在登入後自動偵測到它。 若您協助ASF重新命名,就可以在登入前使用ASF雙重驗證,否則只有在ASF登入成功後才能讀取檔案(因為ASF在實際登入前,無法知道您帳號的steamID)。
Launch ASF, which should notice your file and import it. Assuming that you've imported the correct file with valid secrets, everything should work properly, which you can verify by using 2fa commands. 若您做錯了,隨時可以刪除Bot.db來重新開始。
首先,在ASF的config資料夾中新增一個空的BotName.maFile,其中BotName是您要加入ASF雙重驗證的Bot名稱。 若您提供錯誤的檔名,ASF將無法偵測到它。
現在像平常一樣啟動WinAuth。 右鍵點擊Steam圖示,然後選擇「Show SteamGuard and Recovery Code」。 然後選擇「Allow copy」。 您應該能在視窗底部發現以{開頭的JSON結構。 複製整個本文到上一步您所建立的BotName.maFile檔案中。
Launch ASF, which should notice your file and import it. Assuming that you've imported the correct file with valid secrets, everything should work properly, which you can verify by using 2fa commands. 若您做錯了,隨時可以刪除Bot.db來重新開始。
若您是進階使用者,您也可以手動生成maFile。 若您想從上述以外的其他來源匯入驗證器,則可以使用此方法。 它應有的有效JSON結構如下:
{
"shared_secret": "STRING",
"identity_secret": "STRING"
}標準的驗證器資料擁有更多欄位⸺ASF會在匯入過程完全忽略它們,因為它們不是必需的。 You don't need to remove them - ASF only requires valid JSON with 2 mandatory fields described above, and will ignore additional fields (if any). 當然,您需要將上述範例中的STRING佔位符取代成您帳號的實際有效值。 每個STRING都應是由相應私鑰的Base64編碼形式字元組成。
如果ASF雙重驗證可以使用,ASF將用它自動確認由ASF發起/接受的交易提案。 它還能在需要時自動生成雙重驗證權杖,例如在登入的時候。 除此之外,擁有ASF雙重驗證也能讓您使用2fa指令。
您需要雙重驗證權杖才能存取受到雙重驗證保護的帳號,這也包含每個使用ASF雙重驗證的帳號。 If you've decided to use standalone authenticator, then you should use 2fa <BotNames> command to generate temporary token for given bot instances. In all other scenarios, we recommend to use original authenticator that you've used, although you can use the command as well if it's more convenient to you.
可以,您原有的驗證器依然保有功能,而且能與ASF雙重驗證一起使用。 Keep in mind however that if you invalidate it through any method, then linked ASF 2FA credentials will also no longer be valid.
只需要關閉ASF,並刪除想要移除ASF雙重驗證的Bot的BotName.db檔案。 This option will remove associated imported 2FA with ASF, but will NOT invalidate (unlink) your authenticator. If you instead want to invalidate your authenticator, apart from removing it from ASF (firstly), you should unlink it in original authenticator of your choice. If you can't do that for some reason, for example because you're using ASF 2FA in standalone mode, then use revocation code that you've received during setup, on the Steam website. It's not possible to invalidate your authenticator through ASF.
I linked authenticator in third-party app, then imported to ASF. Can I now link it again on my phone?
不能。 Doing so will invalidate the previously imported credentials and your ASF 2FA will stop functioning (by generating codes no longer being accepted by Steam). Firstly decide where you want to have your original or third-party authenticator located, then import it as ASF 2FA.
是的,有以下幾種原因。 第一個也是最重要的一點:使用ASF雙重驗證能顯著提高安全性,因為ASF雙重驗證模組會保證ASF只自動接受它自己的交易確認,所以,即使攻擊者發起了有害的交易提案,ASF雙重驗證也不會接受這類交易,因為它不是由ASF生成的。 In addition to security part, using ASF 2FA also brings performance/optimization benefits, as ASF 2FA fetches and accepts confirmations immediately after they're generated, and only then, as opposed to inefficient polling for confirmations each X minutes which is achieved by other solutions. There is no reason to use third-party authenticator over ASF 2FA, if you plan on automating confirmations generated by ASF - that's exactly what ASF 2FA is for, and using it does not conflict with you confirming everything else in authenticator of your choice. We strongly recommend to use ASF 2FA for entire ASF activity.







