@@ -576,8 +576,8 @@ async def get_session(self, store_options: Optional[dict[str, Any]] = None) -> O
576576
577577 async def get_access_token (
578578 self ,
579- audience = None ,
580- scope = None ,
579+ audience : Optional [ str ] = None ,
580+ scope : Optional [ str ] = None ,
581581 store_options : Optional [dict [str , Any ]] = None
582582 ) -> str :
583583 """
@@ -618,7 +618,7 @@ async def get_access_token(
618618 if ts .get ("audience" ) == audience and (not scope or ts .get ("scope" ) == scope ):
619619 token_set = ts
620620 break
621-
621+
622622 # After loop: if no matching token found and MRRT disabled, check if we need to error
623623 if not token_set and not self ._use_mrrt and state_data_dict .get ("token_sets" ):
624624 # We have tokens but none match, and we can't use RT to get a new one
@@ -1347,10 +1347,10 @@ async def start_connect_account(
13471347 code_challenge = code_challenge ,
13481348 code_challenge_method = "S256" ,
13491349 state = state ,
1350- authorization_params = options . authorization_params
1350+ authorization_params = auth_params or None
13511351 )
13521352 access_token = await self .get_access_token (
1353- audience = self ._my_account_client .audienceIdentifier ,
1353+ audience = self ._my_account_client .audience_identifier ,
13541354 scope = "create:me:connected_accounts" ,
13551355 store_options = store_options
13561356 )
@@ -1385,7 +1385,7 @@ async def complete_connect_account(
13851385 Handles the redirect callback to complete the connect account flow for linking a third-party
13861386 account to the user's profile.
13871387
1388- This works similiar to the redirect from the login flow except it verifies the `connect_code`
1388+ This works similar to the redirect from the login flow except it verifies the `connect_code`
13891389 with the My Account API rather than the `code` with the Authorization Server.
13901390
13911391 Args:
@@ -1420,7 +1420,7 @@ async def complete_connect_account(
14201420 raise MissingTransactionError ()
14211421
14221422 access_token = await self .get_access_token (
1423- audience = self ._my_account_client .audienceIdentifier ,
1423+ audience = self ._my_account_client .audience_identifier ,
14241424 scope = "create:me:connected_accounts" ,
14251425 store_options = store_options
14261426 )
@@ -1440,7 +1440,7 @@ async def complete_connect_account(
14401440 if transaction_data .app_state is not None :
14411441 response .app_state = transaction_data .app_state
14421442
1443- # Clean up transaction data after successful login
1443+ # Clean up transaction data after successful account connection
14441444 await self ._transaction_store .delete (transaction_identifier , options = store_options )
14451445
14461446 return response
0 commit comments