Coder Social home page Coder Social logo

Comments (10)

felipeelias avatar felipeelias commented on September 21, 2024

Yes, we're very interested on that. A similar approach to devise will help controllers customization, which now is an issue in doorkeeper.

If you have any questions on how to implement this, let me know, I'd be glad to help!

from doorkeeper.

mattgreen avatar mattgreen commented on September 21, 2024

Excellent, I'll take a look at this in the near future and we can talk about it more.

from doorkeeper.

felipeelias avatar felipeelias commented on September 21, 2024

I started this branch https://github.com/applicake/doorkeeper/compare/customisable-routes

Right now it mounts all routes correctly, but since doorkeeper is an isolated engine, it break all url helpers in views (we need to append main_app. to every helper)

I'm still deciding whether we should remove the isolation or not. I'd love to hear some thoughs

from doorkeeper.

mattgreen avatar mattgreen commented on September 21, 2024

The isolation was the reason we use custom controllers to access Doorkeeper functionality. I didn't want to modify the application-wide view templates to use main_app (or whatever it is). If there was a way to remove it, then I didn't find it. :)

I'm definitely in favor of making Doorkeeper a non-isolated engine.

from doorkeeper.

felipeelias avatar felipeelias commented on September 21, 2024

Yep, me too.

I removed the engine isolation in the last commit. I had to change the url helpers in the views anyway, mainly because when models were isolated, Rails could identify the correct routes, but without isolation it couldn't.

Most of helpers have doorkeeper prefix right now, but I thought it would make more sense to use oauth prefix instead (for example oauth_authorization_path)

I'm still not very happy with this change in url helpers, this could cause trouble for uses who generated the views.

from doorkeeper.

felipeelias avatar felipeelias commented on September 21, 2024

@mattgreen In the latest merge on master you can configure the controllers and aliases for them. I think right now we can improve and allow users to skip controllers and so on.

What do you think?

from doorkeeper.

piotrj avatar piotrj commented on September 21, 2024

@mattgreen I just added the ability to skip controllers in the use_doorkeeper block.
You just use it like

  use_doorkeeper do
    skip_controllers :applications, :authorized_applications
  end 

And it will not add routes for that controller in the app.
We will add this code to the released gem when we release 0.5 version.
Hopefully that fixes your issue. Let me know.

from doorkeeper.

mattgreen avatar mattgreen commented on September 21, 2024

Awesome, thanks guys!

from doorkeeper.

spidie avatar spidie commented on September 21, 2024

The skip functionality was just what I was looking for - can we get this added to the documentation? (I am happy to add this if that's ok).

from doorkeeper.

tute avatar tute commented on September 21, 2024

This is more of a Rails feature rather than doorkeeper's, bu I'd merge a PR
that shows this in a sentence or two in the README. Thanks!

On Tuesday, April 28, 2015, Steve Dalton [email protected] wrote:

The skip functionality was just what I was looking for - can we get this
added to the documentation? (I am happy to add this if that's ok).


Reply to this email directly or view it on GitHub
#81 (comment)
.

from doorkeeper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.