How can I configure the OAuth Scope in the method request?

Hey, I set up the authorizer on my project, but I haven’t found where I can set the OAuth Scope. How can i do it?


I see. Bummer. No way to currently set this. Would have to add support around here :

Also, thinking about it generally. In addition to the specific option, may add a more generalized authorizer_options key option to the route DSL methods in case there are other future properties.

Will consider PRs. No sweat either way of course. Will dig into it time. Wanted to at least answer the question though.


I configured the authorizer in my project and I need to add the scope of OAuth. In your last answer, you wrote that it is not possible. I cloned the project and added the behavior.

I added two ways the add scope of OAuth, one on controllers and other on routes.

class ToysController < ApplicationController
  	authorization_scopes %w[create delete]

path: "posts", method: :get, to: "posts#index", authorization_scopes: %w[create delete]

I opened the PR in the Github repository.

The tests, docs and change are on the commits:
1 Like

Thanks! Will take a look when get a chance!