I can't access the me.json endpoint,
11:06:01 web.1 | Started GET "/api/v1/me.json" for ::1 at 2018-07-20 11:06:01 +0100
11:06:01 web.1 | Processing by Api::V1::UsersController#me as JSON
11:06:01 web.1 | Filter chain halted as :doorkeeper_authorize! rendered or redirected
11:06:01 web.1 | Completed 401 Unauthorized in 2ms (ActiveRecord: 0.0ms)
In the screencast, I just commented out the before_action so I could show the JSON it renders. You won't be able to access the URL directly unless you make the request with your token. You can use Postman to try it out, or just uncomment the doorkeeper before_action like I did.
My solution was:
before_action :doorkeeper_authorize!, unless: :user_signed_in? def current_resource_owner @current_user ||= if doorkeeper_token User.find(doorkeeper_token.resource_owner_id) else warden.authenticate(scope: :user) end end
Did anyone else get this error? I get this error when I attempt to go to the /ouath/applications url
Access to admin panel is forbidden due to Doorkeeper.configure.admin_authenticator being unconfigured
I tried creating a user and making sure the user is an admin, but maybe the template doesn't fully create a full working web app with devise? It keeps saying things like "lasted signed in at & current sign in at" doesn't exist for the user schema.
Hi Chris is this video a follow on from something else, there seems to be a lot of code not outlined in the video. Just want to make sure I am starting at the start
That route comes from the doorkeeper gem, so if it's blank, then your installation may not be done right.
This is the episode on the Rails template: https://gorails.com/episodes/rails-application-templates
I am not sure what i am doing wrong but i keep hitting
Started GET "/oauth/applications" for 127.0.0.1 at 2018-09-13 14:37:44 +1000 Processing by Doorkeeper::ApplicationsController#index as HTML Access to admin panel is forbidden due to Doorkeeper.configure.admin_authenticator being unconfigured. Filter chain halted as :authenticate_admin! rendered or redirected Completed 403 Forbidden in 2ms (ActiveRecord: 0.0ms)
I don't know how mutch it will break the logic
but impossible for me to follow exactly the video .
Something is not working as Chris show.
i'm talking about the
ii have the error ⚠️
undefined local variable or method `current_resource_owner' for #<#<Class:0x00007fe41cabc360>:0x00007fe41bda5f28> Did you mean? current_user
to solve this ...
json.id current_user.id json.email current_user.email json.name current_user.name json.avatar_url gravatar_image_url(current_user.email, size: 40) json.id current_user.id json.email current_user.email json.name current_user.name json.avatar_url gravatar_image_url(current_user.email, size: 40)
and it work ✅ but i think that the futur logic won't work
any advice to help ?
Join 22,346+ developers who get early access to new screencasts, articles, guides, updates, and more.