Skip to content

How can i pass 2FA authentification? #325

Discussion options

You must be logged in to vote

There are two options:

  1. Use SteamAuthenticator and generate a 2FA for every login
from steam.client import SteamClient
from steam.guard import SteamAuthenticator

client = SteamClient()
client.set_credential_location('./secrets_directory')

code = SteamAuthenticator(secrets={"shared_secret": "...."}).get_code()

client.login(username, password, two_factor_code=code)
  1. Use login_key (Steam remember password feature)
# first login
client1 = SteamClient()
client1.set_credential_location('.')
client1.cli_login()

if not client1.relogin_available:
    client1.wait_event(EMsg.ClientNewLoginKey)

# save credentials for future logins
relogin_credentials = client1.username, client1.login_key

# s…

Replies: 4 comments 12 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by rossengeorgiev
Comment options

You must be logged in to vote
1 reply
@rossengeorgiev
Comment options

Comment options

You must be logged in to vote
11 replies
@rossengeorgiev
Comment options

@Kein
Comment options

@rossengeorgiev
Comment options

@Kein
Comment options

@rossengeorgiev
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #324 on April 14, 2021 19:46.