+3
-3
src/atproto/oauth.py
+3
-3
src/atproto/oauth.py
···
77
77
},
78
78
data=par_body,
79
79
)
80
+
respjson = await resp.json()
80
81
81
82
# Handle DPoP missing/invalid nonce error by retrying with server-provided nonce
82
-
respjson = await resp.json()
83
83
if resp.status == 400 and respjson["error"] == "use_dpop_nonce":
84
84
dpop_authserver_nonce = resp.headers["DPoP-Nonce"]
85
85
dpop_proof = _authserver_dpop_jwt(
···
204
204
assert is_safe_url(token_url)
205
205
async with hardened_http.get_session() as session:
206
206
resp = await session.post(token_url, data=params, headers={"DPoP": dpop_proof})
207
+
respjson = await resp.json()
207
208
208
209
# Handle DPoP missing/invalid nonce error by retrying with server-provided nonce
209
-
respjson = await resp.json()
210
210
if resp.status == 400 and respjson["error"] == "use_dpop_nonce":
211
211
dpop_authserver_nonce = resp.headers["DPoP-Nonce"]
212
212
dpop_proof = _authserver_dpop_jwt(
···
216
216
resp = await session.post(
217
217
token_url, data=params, headers={"DPoP": dpop_proof}
218
218
)
219
+
respjson = await resp.json()
219
220
220
-
respjson = await resp.json()
221
221
if resp.status not in [200, 201]:
222
222
print(f"Token Refresh Error: {respjson}")
223
223