Push verification ends with "TypeError: can only concatenate str (not "NoneType") to str"
See original GitHub issueDescribe the bug Not able to login using Okta Verify. Checked both kinds regular and Push and result are the same - TypeError: can only concatenate str (not “NoneType”) to str
To Reproduce Steps to reproduce the behavior:
- Configure ~/.okta-aws
- Run CLI tool with specific okta and aws profiles okta-awscli --okta-profile okta-aws206 --profile okta-aws206 --debug
- Catch the error
Expected behavior ~/.aws/credentials should be updated with a token for okta-aws206
Output
Output of your okta-awscli run, using the --debug
flag.
okta-awscli --okta-profile okta-aws206 --profile okta-aws206 --debug
INFO - Temporary credentials have expired. Requesting new credentials.
INFO - Authenticating to: somecompany.okta.com
INFO - Authenticating as: name.surname
Enter password:
INFO - App Link set as: https://somecompany.okta.com/home/amazon_aws/0oa1f32y7xf1K56aT1d8/272 # Found in Okta's configuration for your AWS account.
ERROR - Unsupported factorType: sms
Registered MFA factors:
1: Google Authenticator
2: Okta Verify - Push
3: Okta Verify
Please select the MFA factor: 2
INFO - Performing secondary authentication using: OKTA
DEBUG - {'id': 'opf1drfq8icq0OkZ21d8', 'factorType': 'push', 'provider': 'OKTA', 'vendorName': 'OKTA', 'profile': {'credentialId': 'name.surname@somecompany.okta.com', 'deviceType': 'SmartPhone_IPhone', 'keys': [{'kty': 'PKIX', 'use': 'sig', 'kid': 'default', 'x5c': ['MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsua0l7mgnN1NmZ8aS9gNLhEeEPpft40umIouk+TjyugDFKMFXD8L5vYcstLxKjzMkm/E+0o0HUeF3zRpKci+QlYGv6rhZ7udwTRKHyCoIQ9gpF3T95qM5NRLjscg1rFSURfmjXMPTmDOTDOXcTBlNvfSqU0DZSSf9MTF2kvL9MI37HkNRU307x26tSzNMTykqhQ1/gNd0AYaQ9es7yJhE5HYaUBqY1oRMJh3Xhm1C068NKgcc58mHXwXSF91Z9l9+ZvgHGboMEajZMIp5FmmajzS9BJb9A6PaBb4W6M96q1yU9RNHQcG4uYjBAY1vAnVXJjNs1Ygd4pBvCr0951HHwIDAQAB']}], 'name': 'GS.phone', 'platform': 'IOS', 'version': '11.2.6'}, '_links': {'verify': {'href': 'https://somecompany.okta.com/home/amazon_aws/0oa1f32y7xf1K56aT1d8/verify', 'hints': {'allow': ['POST']}}}}
Waiting for push verification...
ERROR - No Extra Verification
Traceback (most recent call last):
File "/usr/local/bin/okta-awscli", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/oktaawscli/okta_awscli.py", line 113, in main
aws_auth, okta_profile, profile, verbose, logger, token, cache
File "/usr/local/lib/python3.7/site-packages/oktaawscli/okta_awscli.py", line 19, in get_credentials
_, assertion = okta.get_assertion()
File "/usr/local/lib/python3.7/site-packages/oktaawscli/okta_auth.py", line 363, in get_assertion
assertion = self.get_saml_assertion(resp)
File "/usr/local/lib/python3.7/site-packages/oktaawscli/okta_auth.py", line 285, in get_saml_assertion
self.logger.error("SAML assertion not valid: " + assertion)
TypeError: can only concatenate str (not "NoneType") to str
Environment (please complete the following information):
- OS: MacOS 10.14.4
- Python 3.7.3
- Version of okta-awscli 0.4.0
Additional context ~/.okta-aws
➜ cat ~/.okta-aws looks like this
[okta-aws206]
base-url = somecompany.okta.com
username =name.surname
app-link = https://somecompany.okta.com/home/amazon_aws/0oa1f32y7xf1K56aT1d8/272
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Push verification ends with "TypeError: can only concatenate ...
Describe the bug Not able to login using Okta Verify. Checked both kinds regular and Push and result are the same - TypeError:...
Read more >TypeError: can only concatenate str (not "NoneType") to str
The Python "TypeError: can only concatenate str (not "NoneType") to str" occurs when we try to concatenate a string and a None value....
Read more >TypeError: can only concatenate str (not "NoneType") to str
You need to add some exception cases to your code. Firstly, what if the entered character is already lower case? You can do...
Read more >TypeError: can only concatenate str (not "nonetype") to str
The Python error "TypeError: can only concatenate str (not "NoneType") to str" occurs after when you try to concatenate `None` with a string...
Read more >Introduction to Django 3.0 - Building, Authenticating, and ...
This article is the second part of the series, we can find part one here. ... TypeError: can only concatenate str (not "NoneType")...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates? We are having issues as well with okta and AWS SSO 😦
Same