Skip to content

Commit 61e5d42

Browse files
committed
Populate/pull audience to store in token set from transaction state on login
1 parent 7111e65 commit 61e5d42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/auth0_server_python/auth_server/server_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ async def start_interactive_login(
167167
# Build the transaction data to store
168168
transaction_data = TransactionData(
169169
code_verifier=code_verifier,
170-
app_state=options.app_state
170+
app_state=options.app_state,
171+
audience=auth_params.get("audience", None),
171172
)
172173

173174
# Store the transaction data
@@ -302,7 +303,7 @@ async def complete_interactive_login(
302303

303304
# Build a token set using the token response data
304305
token_set = TokenSet(
305-
audience=self._default_authorization_params.get("audience", "default"),
306+
audience=transaction_data.audience or "default",
306307
access_token=token_response.get("access_token", ""),
307308
scope=token_response.get("scope", ""),
308309
expires_at=int(time.time()) +

0 commit comments

Comments
 (0)