Skip to content
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

Multiple Models #1379

Closed
warrenlalata opened this issue Mar 21, 2020 · 8 comments
Closed

Multiple Models #1379

warrenlalata opened this issue Mar 21, 2020 · 8 comments

Comments

@warrenlalata
Copy link

How does doorkeeper support multiple Models? something like this..

image

@nbulaj
Copy link
Member

nbulaj commented Mar 23, 2020

Hi @errawn . Check this one and latest Doorkeeper version:" #1355

Basically now you can enable polymorphic resource owner and just get it from the doorkeeper_token itself (type & id)

@warrenlalata
Copy link
Author

Thank you @nbulaj! Will try it out. Does it have a detailed docs or in wiki? Thank you very much

@nbulaj
Copy link
Member

nbulaj commented Mar 24, 2020

@errawn nope. still no docs or wiki page :(

@warrenlalata
Copy link
Author

warrenlalata commented Mar 24, 2020

@nbulaj I am getting
undefined local variable or method 'use_polymorphic_resource_owner' for #<Doorkeeper::Config::Builder:0x00007fb56eb9e328> (NameError)

When I run bundle exec rails g doorkeeper:enable_polymorphic_resource_owner

@nbulaj
Copy link
Member

nbulaj commented Mar 25, 2020

Which version do you use? This feature isn't released yet and available only on master

@nbulaj
Copy link
Member

nbulaj commented Mar 25, 2020

Added docs here: https://doorkeeper.gitbook.io/guides/ruby-on-rails/polymorphic-resource-owner

@nbulaj
Copy link
Member

nbulaj commented Mar 27, 2020

I think we can close this issue. If you wanna to use polymorphic resource owner feature - you need to use master version of the gem.

Also I saw somewhere on StackOverflow how people bypass the restrictions of Doorkeeper and uses additional http parameter or even scopes to indicate resource owner type. Try to find it

@nbulaj nbulaj closed this as completed Mar 27, 2020
@warrenlalata
Copy link
Author

thanks @nbulaj awesome work! <3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants