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

NoMethodError at /oauth/authorize/native with doorkeeper 5.0 #57

Closed
nhosoya opened this issue Sep 5, 2018 · 7 comments
Closed

NoMethodError at /oauth/authorize/native with doorkeeper 5.0 #57

nhosoya opened this issue Sep 5, 2018 · 7 comments
Assignees
Labels

Comments

@nhosoya
Copy link

nhosoya commented Sep 5, 2018

I noticed that native_oauth_authorization_path( /oauth/authorize/native ) returns the error :

undefined method `application' for nil:NilClass

at here.
This occurs only with doorkeeper 5.0.

--
Probably caused by this changes.
doorkeeper-gem/doorkeeper@698fba0

@toupeira
Copy link
Member

Thanks for the report!

What version of doorkeeper-openid_connect are you on? Does this still happen with 1.5.2?

Also, can you describe how to reproduce the error?

@nhosoya
Copy link
Author

nhosoya commented Sep 18, 2018

This error is reproduced with

ruby 2.5.1
rails 5.2.1
doorkeeper 5.0.0
doorkeeper-openid_connect 1.5.2

I created minimum repository to reproduce this.
https://github.com/nhosoya/doorkeeper-openid_connect-sample

Steps to reproduce:

  1. Create new oauth application that redirect_uri is urn:ietf:wg:oauth:2.0:oob.
  2. Access to Authorization Endpoint for this application and authorize.
    (Or access directly /oauth/authorize/native?code=aaa)

Only doorkeeper(without doorkeeper-openid_connect), this error is not reproduced.
https://github.com/nhosoya/doorkeeper-openid_connect-sample/tree/only-doorkeeper

@arianvp
Copy link

arianvp commented Oct 17, 2018

I'm running into exactly the same issue.

@a-tommyyy
Copy link

next unless pre_auth.scopes.include? 'openid'

i think this line should be changed like below

next unless pre_auth&.scopes&.include? 'openid' 

@toupeira
Copy link
Member

Apologies for the long delay, and happy new year everyone! 😁

I'm not really sure how the native authorization works, but #60 should fix the exception.

Please try again with the new version 1.5.3.

@toupeira toupeira self-assigned this Jan 19, 2019
@toupeira toupeira added the bug label Jan 19, 2019
@nhosoya
Copy link
Author

nhosoya commented Jan 21, 2019

It works fine. Thank you, and happy new year! 😃

@nhosoya nhosoya closed this as completed Jan 21, 2019
@toupeira
Copy link
Member

@nhosoya great, thanks for checking! 👍

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

No branches or pull requests

4 participants