mcordell / grape_token_auth

Token auth for grape apps
MIT License
52 stars 19 forks source link

Requiring gem pollute routes with all possible endpoints bound to root #41

Closed qd3v closed 8 years ago

qd3v commented 8 years ago

This is done by code like this for every strategy @ a time gem is loading:

https://github.com/mcordell/grape_token_auth/blob/master/lib/grape_token_auth/apis/session_api.rb#L53-L61

GET    |  /(.:format)
GET    |  /:provider(.:format)
GET    |  /:provider/callback(.:format)
GET    |  /failure(.:format)
POST   |  /(.:format)
GET    |  /edit(.:format)
PUT    |  /(.:format)
DELETE |  /(.:format)
POST   |  /sign_in(.:format)
DELETE |  /sign_out(.:format)
GET    |  /validate_token(.:format)

This is especially strange for confirmation module, which produce this endpoint:

GET  |  /(.:format) 

Of using mount helpers for scopes adds routes properly. P.S. I'm using grape_on_rails_routes gem to get the list of routes

qd3v commented 8 years ago

after some research, I found what this is a grape_on_rails_routes gem works like this, so those routes actually does not exists. Closing this, sorry :)