feat: support dest_app_name, dest_app_id, and display_username - #42
Merged
AaronAtDuo merged 1 commit intoSep 3, 2026
Merged
Conversation
The OIDC Auth API accepts three optional claims in the authorization request JWT that create_auth_url had no way to send: - dest_app_name: user-facing application name, shown in Duo Mobile and the authentication log - dest_app_id: long-lived unique application identifier, not shown to users - display_username: username shown in the Duo Mobile "user" field for Push, defaulting to the Duo username when omitted All three are optional keyword arguments and are only added to the JWT when provided, so existing callers are unaffected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
scweber-cisco
marked this pull request as ready for review
September 2, 2026 20:13
AaronAtDuo
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The OIDC Auth API documents three optional claims in the authorization request JWT that
create_auth_urlhad no way to send:dest_app_name— user-facing application name, shown in Duo Mobile and surfaced asdestination_namein the authentication logdest_app_id— long-lived unique application identifier, not shown to usersdisplay_username— username shown in the Duo Mobile "user" field for Push; defaults to the Duo username when omittedAll three are optional keyword arguments and are only added to the JWT when provided, so existing callers are unaffected:
Test plan
Three new cases in
tests/test_create_auth.py, each asserting the exact encoded request JWT:dest_app_nameanddest_app_iddisplay_usernamealonedest_app_namealoneThe two pre-existing tests assert the full expected JWT payload, so they already guard against the new claims appearing when unset.
Full suite passes (80 tests) and
flake8is clean.Also manually tested with the demo app. Passing
dest_app_nametocreate_auth_urlresulted in same value being echoed back in the auth response.🤖 Generated with Claude Code