Skip to content

Feature: Upgrade the amazon sdk to support 3.x auth tokens #146

@songron

Description

@songron

I took a look at the source code from amazon sdk, the newer version supports 3.* tokens, see code snippet:
# Cognito endpoints (v2.x)
if version == "2.1":
return "https://creatorsapi.auth.us-east-1.amazoncognito.com/oauth2/token"
elif version == "2.2":
return "https://creatorsapi.auth.eu-south-2.amazoncognito.com/oauth2/token"
elif version == "2.3":
return "https://creatorsapi.auth.us-west-2.amazoncognito.com/oauth2/token"
# LWA endpoints (v3.x)
elif version == "3.1":
return "https://api.amazon.com/auth/o2/token"
elif version == "3.2":
return "https://api.amazon.co.uk/auth/o2/token"
elif version == "3.3":
return "https://api.amazon.co.jp/auth/o2/token"
else:
raise ValueError("Unsupported version: {}. Supported versions are: 2.1, 2.2, 2.3, 3.1, 3.2, 3.3".format(version))

While the included sdk code in this pkg doesn't support 3.x.
If you get a new credentials from amazon creators api (which is 3.1 for US), the current lib will report an error:

ValueError: Unsupported version: 3.1. Supported versions are: 2.1, 2.2, 2.3

It works well when using the the new sdk directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions