You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently doorkeeper's Application model always generates a secret value, even when the client type should not have a client secret generated (i.e., public clients). This means we're storing a secret for applications even when a secret value is completely unneeded
I think the model & migrations likely need to be changed to make oauth_application.secret nullable, and only generate a secret if app.confidential?
However, I'm not sure if POST /oauth/token will explicitly reject the request if client_secret is presented despite the client being public. It seems this happens more through a side effect of by_uid_and_secret()'s logic.
This would save significant database resources for applications such as Mastodon, where we've a significant number of applications, due to using a form of Dynamic Client Registration. (i.e., the application count is in the tens or hundreds of thousands, if not millions).
The text was updated successfully, but these errors were encountered:
Thanks @ThisIsMissEm , agree, that would be great to change. Better to arrange API as well 👍 Would you like to propose a MR? Not sure when I'll be free to check it
Currently doorkeeper's Application model always generates a
secret
value, even when the client type should not have a client secret generated (i.e., public clients). This means we're storing a secret for applications even when a secret value is completely unneededI think the model & migrations likely need to be changed to make
oauth_application.secret
nullable, and only generate a secret ifapp.confidential?
The
Doorkeeper::Application.by_uid_and_secret()
method does do the right thing and not bother with secret validation if the client is public.However, I'm not sure if
POST /oauth/token
will explicitly reject the request ifclient_secret
is presented despite the client being public. It seems this happens more through a side effect ofby_uid_and_secret()
's logic.This would save significant database resources for applications such as Mastodon, where we've a significant number of applications, due to using a form of Dynamic Client Registration. (i.e., the application count is in the tens or hundreds of thousands, if not millions).
The text was updated successfully, but these errors were encountered: