Giter VIP home page Giter VIP logo

Comments (2)

itsjafer avatar itsjafer commented on July 27, 2024

Great question! Here's why we use TOTP authentication: If we use a TOTP to login, we don't need to manually take an SMS code as input everytime we login because we can programmatically generate the one-time 6-digit passcode.

There are two components to doing this:

  1. the TOTP secret: this is the super long key that's generated. This is the string that you provide to the schwab API so it can automatically generate the 6 digit codes without your manual input.
  2. your authenticator app: next time you want to login through the normal schwab website, it'll ask you for the one-time passcode. You'll need the authenticator app in order to generate the code when not using this API!

So in summary:

  1. Generate a TOTP secret and symantec ID using the code above.
  2. Enter the symantec ID on your schwab security center
  3. Write down the TOTP secret somewhere in your notes as well as input it into your authenticator app
  4. When using the schwab_api, provide your username, password, and TOTP secret so that the API can login (you don't need to worry about the six digit code, the API will generate that automatically)
  5. When logging in normally, you'll need the authenticator app to generate the TOTP code

You asked where do we enter the TOTP secret into the codelab, we input it here:

# Login using playwright
print("Logging into Schwab")
logged_in = api.login(
    username=username,
    password=password,
    totp_secret=totp_secret # Get this by generating TOTP at https://itsjafer.com/#/schwab
)

from schwab-api.

mehere avatar mehere commented on July 27, 2024

Thanks a lot for the explanation - never noticed that schwab has such an option in the security center.

from schwab-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.