mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 19:28:35 +00:00
feat: add auto login for bad user sessions
This commit is contained in:
@@ -46,7 +46,7 @@ var initCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
if userCreds.LoginExpired {
|
||||
util.PrintErrorMessageAndExit("Your login session has expired, please run [infisical login] and try again")
|
||||
userCreds = util.EstablishUserLoginSession()
|
||||
}
|
||||
|
||||
httpClient, err := util.GetRestyClientWithCustomHeaders()
|
||||
@@ -81,7 +81,7 @@ var initCmd = &cobra.Command{
|
||||
if tokenResponse.MfaEnabled {
|
||||
i := 1
|
||||
for i < 6 {
|
||||
mfaVerifyCode := askForMFACode(tokenResponse.MfaMethod)
|
||||
mfaVerifyCode := util.AskForMFACode(tokenResponse.MfaMethod)
|
||||
|
||||
httpClient, err := util.GetRestyClientWithCustomHeaders()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user