doorkeeper-gem / doorkeeper-openid_connect

OpenID Connect extension for Doorkeeper
MIT License
173 stars 114 forks source link

Can `.well-known/openid-configuration` return an alternate uri for `jwks_uri` #159

Open magic7s opened 2 years ago

magic7s commented 2 years ago

I'm struggling to find a way to configure an alternate uri for jwks_uri in .well-known/openid-configuration. I have read discovery_url_options and found that I can change some things but not the full uri. Any help would be appreciated.

I need https://example.com/oauth/discovery/keys to become https://example.com/-/jwks

toupeira commented 2 years ago

Hmm it's not directly possible, but you might be able to achieve this by defining a custom route named oauth_discovery_keys, after the call to use_doorkeeper_openid_connect.

Maybe something like:

match '/-/jwks', to: 'doorkeeper/openid_connect/discovery#keys', as: :oauth_discovery_keys