diff --git a/gamestonk_terminal/portfolio/README.md b/gamestonk_terminal/portfolio/README.md index 8c4108ce16d..863f9223673 100644 --- a/gamestonk_terminal/portfolio/README.md +++ b/gamestonk_terminal/portfolio/README.md @@ -9,6 +9,9 @@ login ```` Which will use your login information, which should be stored as environment variables in [config file](/gamestonk_terminal/config_terminal.py) +Robinhood has Two Factor Autentication, so you will likely be prompted to enter a code that is texted/emailed to you. +###NOTE THAT LOGGING IN WILL SAVE A TOKEN TO `os.path.expanduser("~")/.tokens` WHICH CAN BE USED TO LOGIN EVEN IF USER CREDENTIALS ARE INCORRECT. + [ROBINHOOD](#ROBINHOOD) * [hold](#hold) * Look at current (stock only) holdings diff --git a/gamestonk_terminal/portfolio/port_menu.py b/gamestonk_terminal/portfolio/port_menu.py index 326b3cc6989..ec326504725 100644 --- a/gamestonk_terminal/portfolio/port_menu.py +++ b/gamestonk_terminal/portfolio/port_menu.py @@ -1,4 +1,5 @@ import argparse +import time from matplotlib import pyplot as plt from prompt_toolkit.completion import NestedCompleter from gamestonk_terminal import feature_flags as gtff @@ -26,7 +27,7 @@ def print_port(show_login): def port_menu(): plt.close("all") port_parser = argparse.ArgumentParser(prog="port", add_help=False) - choices = ["help", "q", "quit", "hold", "rhhist", "login", "logoff"] + choices = ["help", "q", "quit", "hold", "rhhist", "login"] port_parser.add_argument("cmd", choices=choices) completer = NestedCompleter.from_nested_dict({c: None for c in choices}) should_print_help = True @@ -83,9 +84,16 @@ def port_menu(): rh_api.plot_historical(l_args) elif ns_known_args.cmd == "login": - rh_api.login() + try: + rh_api.login() + except Exception as e: + print(e) + print("Incorrect Login") + print("") + time.sleep(2) should_print_help = True print_login = False else: print("Command not recognized") + print("")