Skip to content

Commit

Permalink
Update init script prompt to avoid leading zeros being trimmed.
Browse files Browse the repository at this point in the history
  • Loading branch information
indiefan committed Nov 7, 2023
1 parent 62ce50d commit af45ae2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/init-nanit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ fi

echo -e "\n"

read -p 'Code (check your email): ' MFA_CODE
# Instruct users to include quotes because otherwise leading zeros are trimmed.
read -p 'Code (check your email), include quotes (e.g. "0000"): ' MFA_CODE

# TODO: show json and disable --silent in curl when debug flag is present
BODY=$(jq -n --arg email "$EMAIL" --arg password "$PASSWORD" --argjson mfa_code "$MFA_CODE" --argjson mfa_token "$MFA_TOKEN" '{email: $email, password: $password, mfa_token: $mfa_token, mfa_code: $mfa_code, channel: "email"}' | curl --silent --header 'nanit-api-version: 1' --header 'Content-Type: application/json' -d@- https://api.nanit.com/login)
Expand Down

0 comments on commit af45ae2

Please sign in to comment.