Fix client auth method fallback on refresh

Changed files
+5 -4
backend
src
backend
_internal
atproto
+5 -4
backend/src/backend/_internal/atproto/client.py
··· 11 11 12 12 from backend._internal import Session as AuthSession 13 13 from backend._internal import get_oauth_client, get_session, update_session_tokens 14 - from backend._internal.auth import get_refresh_token_lifetime_days 14 + from backend._internal.auth import ( 15 + get_client_auth_method, 16 + get_refresh_token_lifetime_days, 17 + ) 15 18 16 19 logger = logging.getLogger(__name__) 17 20 ··· 125 128 "dpop_authserver_nonce": refreshed_session.dpop_authserver_nonce, 126 129 "dpop_pds_nonce": refreshed_session.dpop_pds_nonce or "", 127 130 } 128 - client_auth_method = ( 129 - updated_oauth_data.get("client_auth_method") or "public" 130 - ) 131 + client_auth_method = get_client_auth_method(updated_oauth_data) 131 132 refresh_lifetime_days = get_refresh_token_lifetime_days(client_auth_method) 132 133 refresh_expires_at = datetime.now(UTC) + timedelta( 133 134 days=refresh_lifetime_days