Skip to content

Commit

Permalink
Merge pull request #408 from longbowrocks/prevent_bad_device_token
Browse files Browse the repository at this point in the history
Prevent bad device token
  • Loading branch information
epierce authored Jun 1, 2023
2 parents 679c30f + 4aee4ed commit 4f37919
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion gimme_aws_creds/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ def update_config_file(self):
'preferred_mfa_type': '',
'remember_device': 'n',
'aws_default_duration': '3600',
'device_token': '',
'output_format': 'export',
}

Expand Down
2 changes: 1 addition & 1 deletion gimme_aws_creds/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,7 @@ def handle_action_store_json_creds(self, stream=None):

def handle_action_register_device(self):
# Capture the Device Token and write it to the config file
if self.okta_platform == "classic" and ( self.device_token is None or self.config.action_register_device is True ):
if self.okta_platform == "classic" and ( not self.device_token or self.config.action_register_device is True ):
if not self.config.action_register_device:
self.ui.notify('\n*** No device token found in configuration file, it will be created.')
self.ui.notify('*** You may be prompted for MFA more than once for this run.\n')
Expand Down

0 comments on commit 4f37919

Please sign in to comment.