-
Notifications
You must be signed in to change notification settings - Fork 114
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
Undefined method `openid_request' using custom access grant class. #127
Comments
@phlegx thanks for the report! I'm not sure if we already have access to Doorkeeper's configuration when that But the doorkeeper-openid_connect/lib/doorkeeper/openid_connect/orm/active_record/access_grant.rb Lines 8 to 11 in 68459f9
prepend ::Doorkeeper::OpenidConnect::AccessGrant ?
Let me know if that works and is an acceptable solution, and I'll add a note to the README similar to https://doorkeeper.gitbook.io/guides/configuration/models. We could also support |
So, I should put |
@phlegx yes, that should pull in the I was also curious now if we could just monkey-patch |
Just adding a note here that I needed to specify: has_one :openid_request,
class_name: 'Doorkeeper::OpenidConnect::Request',
inverse_of: :access_grant,
dependent: :delete and include Mysql2::Error: Unknown column 'oauth_openid_requests.{custom_table_name}_id' in 'where clause': SELECT `oauth_openid_requests`.* FROM `oauth_openid_requests` WHERE `oauth_openid_requests`.`{custom_table_name}_id` = X LIMIT 1 The schema at this point had already been using |
I use doorkeeper config:
Call
POST "/oauth/token"
I get:If I remove
access_grant_class 'Oauth::AccessGrant'
config. All works fine.Here my
Oauth::AccessGrant
class:Maybe in this line:
doorkeeper-openid_connect/lib/doorkeeper/openid_connect/orm/active_record/access_grant.rb
Line 17 in 7e8e58c
the
access_grant_class
config must be used if set in config.Workaround
The text was updated successfully, but these errors were encountered: