20 from ..modules
import user, ui
21 from ...configuration
import UserConfiguration, InvalidConfiguration, ConfigurationNotFound, utils
27 userConfig = UserConfiguration.load()
28 if not ui.clickPrompt(
29 f
"User already logged in with username {userConfig.username}.\nWould you like to log in with a different user (Y/n)?",
36 except (ConfigurationNotFound, InvalidConfiguration):
39 ui.stdEcho(
"Please enter your credentials:")
40 userConfig = user.configUser()
42 initialData = utils.fetchInitialData()
43 userConfig.frontendUrl = initialData.get(
"frontend_url",
"app.coretex.ai/")
46 ui.successEcho(f
"User {userConfig.username} successfully logged in.")