Commit bdcc89a
committed
fix(auth): support wildcard audience validation for OAuth providers without aud claim
The JWT validator's wildcard audience feature (audience: '*') was not working as documented.
When configured with audience: '*', the validator still required tokens to have an aud claim,
preventing Dynamic Client Registration (DCR) from working with OAuth providers that don't include
aud in access tokens (e.g., AWS Cognito which uses client_id instead).
Changes:
- Make audience validation conditional in jwt.verify() options
- Only require aud claim when config.audience !== '*'
- Update debug logging to handle tokens without aud claim
This enables full DCR support for all RFC-compliant OAuth 2.0/2.1 providers.1 parent 3ac5fc7 commit bdcc89a
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | 110 | | |
112 | 111 | | |
113 | 112 | | |
114 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
| |||
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
150 | | - | |
| 154 | + | |
| 155 | + | |
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| |||
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
160 | | - | |
161 | | - | |
162 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
163 | 170 | | |
164 | 171 | | |
165 | 172 | | |
| |||
0 commit comments