Closed ThisIsMissEm closed 1 month ago
The changes introduce a new endpoint for OAuth server discovery at /.well-known/oauth-authorization-server
in src/index.tsx
, utilizing the newly implemented oauthAuthorizationServer
function from src/oauth.tsx
. The OAuth functionality is enhanced with stricter validation rules, including optional redirect_uri
in token requests and improved error handling for various scenarios. The existing application routes and middleware remain unchanged, ensuring that the core functionality is preserved while extending the overall capabilities of the OAuth implementation.
File | Change Summary |
---|---|
src/index.tsx | Added import for oauthAuthorizationServer and a new route for /.well-known/oauth-authorization-server . |
src/oauth.tsx | Introduced oauthAuthorizationServer function; updated tokenRequestSchema to make redirect_uri optional; enhanced error handling for OAuth requests. |
CHANGES.md | Updated changelog for version 0.2.0, including new features and improvements related to OAuth and RFC 8414. |
Objective | Addressed | Explanation |
---|---|---|
GET /.well-known/oauth-authorization-server (46) |
✅ | |
Correct URL generation for endpoints (46) | ❌ | No changes related to URL generation were made. |
Return values in scopes Enum scopeEnum.enumValues (46) |
❓ | Unclear if this was addressed in the changes. |
response_types_supported of code (46) |
❓ | Unclear if this was addressed in the changes. |
grant_types_supported of authorization_code (46) |
❓ | Unclear if this was addressed in the changes. |
In the realm of OAuth, a new path we weave,
With/.well-known
, our clients believe.
Redirects optional, errors more clear,
A server discovery, let’s all give a cheer!
Hops of validation, we bound and we play,
In the garden of tokens, we frolic all day! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@ThisIsMissEm Oh, could you add an entry to the CHANGES.md file?
@ThisIsMissEm Oh, could you add an entry to the CHANGES.md file?
Done.
redirect_uri
being required forclient_credentials
grant flow (it's actually not required for that flow)redirect_uri
in the token request at least is present within the registered application — however, if we moved to Access Grants being stored, then we'd check "does this access grant authorize redirecting to this URI?" which is actually the OAuth logic here: if you start an OAuth flow with authorize using redirectUri1 but then try to exchange the code with redirectUri2, it should fail.Summary by CodeRabbit
New Features
/.well-known/oauth-authorization-server
.Bug Fixes