-
-
Notifications
You must be signed in to change notification settings - Fork 975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document new OAuth changes for 4.3.0 #1445
Document new OAuth changes for 4.3.0 #1445
Conversation
I have noticed that there is some churn here due to my editor using Prettier for markdown documents. We may want to consider adopting prettier for this repository. |
92be172
to
9e25eff
Compare
This pull request has merge conflicts that must be resolved before it can be merged. |
7623240
to
83aaf51
Compare
Have address majority of the code review comments and left replies where I disagree with said comments or need more information. |
This pull request has resolved merge conflicts and is ready for review. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has resolved merge conflicts and is ready for review. |
…ation used to create them
26f9c77
to
4c929cf
Compare
Password grant flow | ||
: For bots and other single-user applications | ||
|
||
Client credentials flow | ||
: For applications that do not act on behalf of users | ||
|
||
### Token revocation endpoint (RFC 7009 Section 2) {#revoke} | ||
Mastodon has historically supported the Password Grant flow, however, usage is [not recommended](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#name-resource-owner-password-cre) by the OAuth 2 Specification authors due to security issues, and has subsequently been removed from future versions of Mastodon. Instead, it is recommended that you create an OAuth Application for that user, and use the generated Access Token for interacting with the API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ClearlyClaire This is the change I did for the removal of the Password Grant Flow Type. Since it's not actually deprecated in 4.3, I've just made it a paragraph explaining it has been supported, but not when it's removed.
|
||
## OAuth 2 Security Considerations | ||
|
||
### Proof Key for Code Exchange (PKCE) {#pkce} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ClearlyClaire this is the documentation I've gone with to explain PKCE, I think linking to OAuth.net's documentation around PKCE explains this better than I could here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have separately documented on the oauth/authorize
and oauth/token
endpoints that we accept the PKCE parameters.
4c929cf
to
fb058f0
Compare
@renchap have rebased this and finished the two remaining tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added two tiny, tiny remarks, otherwise this looks good to me and should be merged asap.
I took the liberty to commit my two small adjustments, so that we can finally merge. Feel free to open up a follow-up PR if you disagree with my changes. And thanks for all the hard work on this! |
@oneiros those changes looked good, I think in the future reworking all this documentation to be more like AT Protocol's OAuth documentation might be a good idea. I think the current tutorial-based documentation leaves a lot to be desired. |
/.well-known/oauth-authorization-server
documentation, per Implement RFC 8414 for OAuth 2.0 server metadata mastodon#29191redirect_uri
onApplication
and addition ofredirect_uris
client_id
,client_secret
,access_token
andcode
values that they should be treated as if they are password, and stored securely.read
scope forGET /api/v1/apps/verify_credentials
(this now just requires a valid access token), per Feature: Allow oauth application introspection without read scope mastodon#27142client_secret_expires_at
onApplication
, per Add client_secret_expires_at to OAuth Applications mastodon#30317Application
vsCredentialApplication
split, per Support multiple redirect_uris when creating OAuth 2.0 Applications mastodon#29192profile
scope, per Changeread:me
scope toprofile
scope mastodon#30357 & Add read:me OAuth 2.0 scope, allowing more limited access to user data mastodon#29087crypto
scope, per: Remove unused E2EE messaging code mastodon#31193This branch is based on #1444