Explorar o código

修复refresh_token赋值问题

locky hai 1 ano
pai
achega
f67ddd141c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Controller/alexa/AlexaController.py

+ 1 - 1
Controller/alexa/AlexaController.py

@@ -146,8 +146,8 @@ class AppToAppView(View):
         try:
             # 使用刷新令牌获取新的访问令牌
             # https://developer.amazon.com/zh/docs/login-with-amazon/authorization-code-grant.html#using-refresh-tokens
-            amazon_refresh_token = alexa_oauth_qs[0]['amazon_access_token']
             alexa_api_endpoint = alexa_oauth_qs[0]['alexa_api_endpoint']
+            amazon_refresh_token = alexa_oauth_qs[0]['amazon_refresh_token']
 
             amazon_base_uri = 'https://api.amazon.com'
             url = amazon_base_uri + '/auth/o2/token'