Skip to content

Two factor authentication fr FR

ArchiBot edited this page May 14, 2024 · 28 revisions

Authentification à deux facteurs

Steam includes two-factor authentication system known as "Escrow" that requires extra details for various account-related activity. Vous pouvez en apprendre plus par rapport à ce système ici et ici. This page considers that 2FA system as well as our solution that integrates with it, called ASF 2FA.


Logique de ASF

Regardless if you use ASF 2FA or not, ASF includes proper logic and is fully aware of accounts protected by standard 2FA. It will ask you for required details when they're needed (such as during logging in). However, those requests can be automated by using ASF 2FA, which will automatically generate required tokens, saving you hassle and enabling extra functionality (described below).


ASF 2FA

ASF 2FA is a built-in module responsible for providing 2FA features to the ASF process, such as generating tokens and accepting confirmations. It can work in many modes, such as standalone or by duplicating your existing authenticator details (so that you can use your current authenticator and ASF 2FA at the same time).

You can verify whether your bot account is using ASF 2FA already by executing 2fa commands. Unless you've already imported your authenticator as ASF 2FA, all standard 2fa commands will be non-operative, which means that your account is not using ASF 2FA, therefore it's also unavailable for advanced ASF features that require the module to be operative.


Recommendations

There are a lot of ways to make ASF 2FA operative, here we include our recommendations based on your current situation:

  • If you're already using SteamDesktopAuthenticator, WinAuth or any other third-party app that allows you to extract 2FA details with ease, just import those to ASF.
  • If you're using official app and you don't mind resetting your 2FA credentials, the best way is to disable 2FA, then create new 2FA credentials by using joint authenticator, which will allow you to use official app and ASF 2FA. This method doesn't require root or advanced knowledge, barely following instructions.
  • If you're using official app and don't want to recreate your 2FA credentials, your options are very limited, typically you'll need root and extra fiddling around to import those details, and even with that it might be impossible.
  • If you're not using 2FA yet and don't care, you can use ASF 2FA with standalone authenticator, third-party app duplicating to ASF (recommendation #1), or joint authenticator with official app (recommendation #2).

Below we discuss all possible options and known to us methods.


Creation

In general, we strongly recommend duplicating your existing authenticator, since that's the main purpose ASF 2FA was designed for. However, ASF comes with an official MobileAuthenticator plugin that further extends ASF 2FA, allowing you to link a completely new authenticator as well. This can be useful in case you're unable or unwilling to use other tools and do not mind ASF 2FA becoming your main (and maybe only) authenticator.

There are two possible scenarios for adding a two-factor authenticator with the MobileAuthenticator plugin: standalone or joint with the official Steam mobile app. In the second scenario, you will end up with the same authenticator on both the ASF and mobile app; both will generate the same codes, and both will be able to confirm trade offers, Steam Community Market transactions, etc.

Common steps for both scenarios

No matter if you plan to use ASF as the standalone authenticator or want the same authenticator on the official Steam mobile app, you need to do those initialization steps:

  1. Create an ASF bot for the target account, start it, and log in, which you probably already did.
  2. Optionally, assign a working and operational phone number to the account here to be used by the bot. This will allow you to receive SMS code and allow recovery if needed, but it's not mandatory.
  3. Ensure you're not using 2FA yet for your account, if you do, disable it first.
  4. Execute the 2fainit [Bot] command, replacing [Bot] with your bot's name.

Assuming you got a successful reply, the following two things have happened:

  • A new <Bot>.maFile.PENDING file was generated by ASF in your config directory.
  • SMS was sent from Steam to the phone number you have assigned for the account above. If you didn't set a phone number, then an email was sent instead to the account e-mail address.

The authenticator details are not operational yet, however, you can review the generated file if you'd like to. If you want to be double safe, you can, for example, already write down the revocation code. The next steps will depend on your selected scenario.

Standalone authenticator

If you want to use ASF as your main (or even only) authenticator, now you need to do the finalization step:

  1. Execute the 2fafinalize [Bot] <ActivationCode> command, replacing [Bot] with your bot's name and <ActivationCode> with the code you've received through SMS or e-mail in the previous step.

Joint authenticator

If you want to have the same authenticator in both ASF and the official Steam mobile app, now you need to do the next steps:

  1. Ignore the SMS or e-mail code that you've received after the previous step.
  2. Install the Steam mobile app if it's not installed yet, and open it. Navigate to the Steam Guard tab and add a new authenticator by following the app's instructions.
  3. After your authenticator in the mobile app is added and working, return to ASF. You now need to tell ASF that finalization is done with the help of one of the two commands below:
  • Wait until the next 2fa code is shown in the Steam mobile app, and use the command 2fafinalized [Bot] <2fa_code_from_app> replacing [Bot] with your bot's name and <2fa_code_from_app> with the code you currently see in the Steam mobile app. If the code generated by ASF and the code you provided are the same, ASF assumes that an authenticator was added correctly and proceeds with importing your newly created authenticator.
  • We strongly recommend to do the above in order to ensure that your credentials are valid. However, if you don't want to (or can't) check if codes are the same and you know what you're doing, you can instead use the command 2fafinalizedforce [Bot], replacing [Bot] with your bot's name. ASF will assume that the authenticator was added correctly and proceed with importing your newly created authenticator.

After finalization

Assuming everything worked properly, the previously generated <Bot>.maFile.PENDING file was renamed to <Bot>.maFile.NEW. This indicates that your 2FA credentials are now valid and active. We recommend that you create a copy of that file and keep it in a secure and safe location. In addition to that, we recommend you 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 regard to technical details, the generated maFile includes all details that we have received from the Steam server during linking the authenticator, and in addition to that, the device_id field, which may be needed for other authenticators. The file is fully compatible with SDA for import.

ASF automatically imports your authenticator once the procedure is done, and therefore 2fa and other related commands should now be operational for the bot account you linked the authenticator to.


Import

Import process requires already linked and operational authenticator that is supported by ASF. ASF currently supports a few different official and unofficial sources of 2FA - Android, SteamDesktopAuthenticator and WinAuth, on top of manual method which allows you to provide required credentials yourself. If you don't have any authenticator yet, you need to choose one of available apps and set it up firstly. If you don't know better which one to pick, we recommend WinAuth, but any of the above will work fine assuming you follow the instructions.

Tous les guides suivants exigent que vous ayez déjà un authentificateur ** fonctionnel et opérationnel </ 0> utilisé avec un outil / ou une application tiers. ASF 2FA ne fonctionnera pas correctement si vous importez des données non valides. Assurez-vous donc que votre authentificateur fonctionne correctement avant de tenter de l'importer. Cela inclut de tester et de vérifier que les fonctions suivantes de l'authentificateur fonctionnent correctement:

  • Vous pouvez générer des jetons et ces jetons sont acceptés par le réseau Steam
  • Vous pouvez récupérer les confirmations et elles arrivent sur votre authentificateur mobile
  • Vous pouvez accepter ces confirmations et elles sont correctement reconnues par le réseau Steam comme confirmées / rejetées.

Ensure that your authenticator works by checking if above actions work - if they don't, then they won't work in ASF either, you'll only waste time and cause yourself additional trouble.


Téléphone Android

En général, pour l’importation de l'authentificateur depuis votre téléphone Android, vous aurez besoin de l'accès root. The below instructions require from you fairly decent knowledge in Android modding world, we're definitely not going to explain every step here, visit XDA and other resources for additional information/help with below.

Prerequisites:

  • Install official Steam app from store, if you haven't yet.
  • Assign authenticator to your account and ensure it works - generates valid tokens and can accept confirmations.

Extraction (requires rooting your device):

Now that you've successfully extracted required details, disable the module to prevent the window from showing each time, then copy value of shared_secret and identity_secret of the account that you intend to add to ASF 2FA, into a new text file with below structure:

{
  "shared_secret": "STRING",
  "identity_secret": "STRING"
}

Replace each STRING value with appropriate private key from extracted details. Once you do that, rename the file to BotName.maFile, where BotName is the name of your bot you're adding ASF 2FA to, and put it in ASF's config directory if you haven't yet. Afterwards, launch ASF - it should notice the .maFile and import it.

[*] INFO: ImportAuthenticator() <1> Converting .maFile into ASF format...
[*] INFO: ImportAuthenticator() <1> Successfully finished importing mobile authenticator!

That's all, assuming that you've imported the correct file with valid secrets, everything should work properly, which you can verify by using 2fa commands. If you made a mistake, you can always remove Bot.db and start over if needed.


SteamDesktopAuthenticator

Si vous avez votre authentificateur SDA déjà en fonctionnement, vous devriez remarquer que le fichier steamID.maFile est disponible dans le dossier maFiles. Make sure that maFile is in unencrypted form, as ASF can't decrypt SDA files - unencrypted file content should start with { and end with } character. If needed, you can remove the encryption from SDA settings first, and enable it again when you're done. Once the file is in unencrypted form, copy it to config directory of ASF.

You can now rename steamID.maFile to BotName.maFile in ASF config directory, where BotName is the name of your bot you're adding ASF 2FA to. Sinon, vous pouvez le laisser tel quel, ASF le sélectionnera automatiquement après vous être connecté. Renaming the file helps ASF by making it possible to use ASF 2FA before logging in, if you don't do that, then the file can be picked only after ASF successfully logs in (as ASF doesn't know steamID of your account before in fact logging in).

Si vous avez tout fait correctement, lancez ASF, et vous devriez remarquer:

[*] INFO: ImportAuthenticator() <1> Converting .maFile into ASF format...
[*] INFO: ImportAuthenticator() <1> Successfully finished importing mobile authenticator!

Votre ASF 2FA devrait désormais être opérationnel pour ce compte.


WinAuth

Une fois que votre fichier est sur votre PC, saisissez-le sous la forme `BotName.maFile</ 0> dans le répertoire de configuration ASF, où BotName</ 0> correspond au nom de votre bot auquel vous ajoutez ASF 2FA. N'oubliez pas qu'il doit s'agir de BotName.maFile </ 0> et NON BotName.maFile.txt </ 0>, Windows masque parfois les extensions connues par défaut. Si vous indiquez un nom incorrect, il ne sera pas sélectionné par ASF.

Maintenant, lancez WinAuth comme d’habitude. Faites un clic droit sur l'icône Steam et sélectionnez "Afficher le code SteamGuard et le code de récupération". Puis cochez "Autoriser la copie". Vous devez connaître la structure JSON que vous connaissez bien en bas de la fenêtre, en commençant par { 0>. Copiez le texte entier dans un fichier BotName.maFile 0> créé par vous même à l'étape précédente.

Si vous avez tout fait correctement, lancez ASF, et vous devriez remarquer:

[*] INFO: ImportAuthenticator() <1> Converting .maFile into ASF format...
[*] INFO: ImportAuthenticator() <1> Successfully finished importing mobile authenticator!
`

Votre ASF 2FA devrait désormais être opérationnel pour ce compte.


Done

From this moment, all 2fa commands will work as they'd be called on your classic 2FA device. You can use both ASF 2FA and your authenticator of choice (Android, SDA or WinAuth) to generate tokens and accept confirmations.

Si vous avez l’authentificateur sur votre téléphone, vous pouvez éventuellement supprimer SteamDesktopAuthenticator et/ou WinAuth, car vous n'en aurez plus réellement besoin. Cependant, je conseille de le garder juste au cas où, pour ne pas dire qu’il est plus maniable que l’authentificateur Steam ordinaire. Just keep in mind that ASF 2FA is NOT a general purpose authenticator, it doesn't include all data that authenticator should have, but limited subset of original maFile. It's not possible to convert ASF 2FA back to original authenticator, therefore always make sure that you have general-purpose authenticator or maFile in other place, such as in WinAuth/SDA, or on your phone.


FAQ

Comment ASF utilise-t-il le module 2FA?

Si ASF 2FA est disponible, ASF l'utilisera pour la confirmation automatique des transactions en cours d'envoi / acceptées par ASF. Il sera également capable de générer automatiquement des jetons 2FA au besoin, par exemple pour se connecter. De plus, ASF 2FA active également les commandes ` 2fa </ 0> que vous pouvez utiliser. Cela devrait être tout pour le moment, si je n'ai rien oublié - ASF utilise essentiellement le module 2FA au besoin.


Et si j'ai besoin d'un jeton 2FA?

Vous aurez besoin du jeton 2FA pour accéder à un compte protégé par 2FA, qui comprend également chaque compte ASF 2FA. Vous devez générer des jetons dans l'authentificateur que vous avez utilisés pour l'importation, mais vous pouvez également générer des jetons temporaires via la commande 2fa 0> envoyée via le chat à un bot. Vous pouvez également utiliser la commande 2fa <BotNames> 0> pour générer un jeton temporaire pour des instances de bot. This should be enough for you to access bot accounts through e.g. browser, but as noted above - you should use your friendly authenticator (Android, SDA or WinAuth) instead.


Puis-je utiliser mon authentificateur d'origine après l'avoir importé au format ASF 2FA?

Oui, votre authentificateur d'origine reste fonctionnel et vous pouvez l'utiliser avec ASF 2FA. C’est l’essentiel du processus: nous importons vos informations d’authentification dans ASF afin qu’ASF puisse les utiliser et accepter les confirmations sélectionnées en votre nom.


Où l'authentificateur mobile ASF est-il enregistré?

L’authentificateur mobile ASF est enregistré dans le fichier BotName.db 0> de votre répertoire de configuration, avec d’autres données cruciales relatives à un compte. Si vous souhaitez supprimer ASF 2FA, lisez la procédure ci-dessous.


Comment supprimer ASF 2FA?

Arrêtez simplement ASF et supprimez le fichier BotName.db 0> du bot associé à ASF 2FA que vous souhaitez supprimer. Cette option supprimera les fichiers 2FA importés associés à ASF, mais ne supprimera PAS votre authentificateur. If you instead want to delink your authenticator, apart from removing it from ASF (firstly), you should delink it in authenticator of your choice (Android, SDA or WinAuth), or - if you can't for some reason, use revocation code that you received during linking that authenticator, on the Steam website. It's not possible to unlink your authenticator through ASF, this is what general-purpose authenticator that you already have should be used for.


J'ai lié l'authentifiant dans SDA / WinAuth, puis importé dans ASF. Can I now unlink it and link it again on my phone?

Non ASF importe 0> vos données d'authentificateur pour pouvoir les utiliser. Si vous désactivé votre authentificateur, ASF 2FA cessera de fonctionner, que vous le supprimiez ou non comme indiqué ci-dessus. Si vous souhaitez utiliser votre authentificateur à la fois sur votre téléphone et sur ASF (plus éventuellement dans SDA / WinAuth), vous devez importer 0> votre authentificateur à partir de votre téléphone et ne pas en créer un nouveau dans SDA / WinAuth. Vous ne pouvez avoir seulement un 0> authentificateur lié, c’est pourquoi ASF importe 0> cet authentificateur et ses données afin de l’utiliser en tant que ASF 2FA - identique 0> authentificateur, juste existant à deux endroits. Si vous décidez de supprimer les informations d'identification de votre authentificateur mobile, quelle que soit la méthode utilisée, ASF 2FA cessera de fonctionner, car les informations d'identification de l'authentificateur mobile précédemment copiées ne seront plus valides. In order to use ASF 2FA together with authenticator on your phone, you must import it from Android, which is described above.


L'utilisation de ASF 2FA est-elle meilleure que l'authentificateur WinAuth / SDA / pour accepter toutes les confirmations?

Oui 0>, à plusieurs niveaux. Le premier et le plus important - utiliser ASF 2FA de manière significative 0> augmente votre sécurité, car le module ASF 2FA garantit qu'ASF n'acceptera automatiquement que ses propres confirmations. Ainsi, même si l'attaquant demande une transaction, ASF 2FA n'acceptera pas un tel échange, car il n'a pas été généré par ASF. Outre la partie sécurité, l'utilisation d'ASF 2FA apporte également des avantages en termes de performances / optimisation, car ASF 2FA extrait et accepte les confirmations immédiatement après leur génération, , par opposition à une interrogation inefficace des confirmations toutes les X minutes effectuées, par exemple. par SDA ou WinAuth. En bref, il n’ya aucune raison d’utiliser un authentifiant tiers sur ASF 2FA, si vous envisagez d’automatiser les confirmations générées par ASF - c’est exactement ce à quoi ASF 2FA est destiné, et son utilisation n’est pas en conflit avec vous tout le reste de l’authentificateur de votre choix. Nous vous recommandons vivement d’utiliser ASF 2FA pour l’ensemble de l’activité ASF - cette solution est beaucoup plus sécurisée que toute autre solution.


Configuration avancée

Si vous êtes un utilisateur expérimenté, vous pouvez également générer manuellement le fichier maFile. Cela peut être utilisé dans le cas où vous vouliez importer un authentificateur depuis d'autres sources que celles que nous avons décrites ci-dessus. Il devrait avoir une structure JSON valide de ce type :

{
  "shared_secret": "STRING",
  "identity_secret": "STRING"
}
`

Les données d'authentificateur standard comportent plus de champs. ASF les ignore totalement lors de l'importation, car elles ne sont pas nécessaires. You don't have to remove them - ASF only requires valid JSON with 2 mandatory fields described above, and will ignore additional fields (if any). Of course, you need to replace STRING placeholder in the example above with valid values for your account. Each STRING should be base64-encoded representation of bytes the appropriate private key is made of.

Clone this wiki locally