8

I'm using Omniauth with Devise using the google_oauth2 strategy. It works well, but now I'd like to change the authorize path with something of my choice.

Actually it's http://localhost:3000/users/auth/google_oauth2 while I'd like a much simpler http://localhost:3000/login since it's simple to remember.

It would not raise any error since I've disabled the Devise database authenticable (the only way to login is through a google account).

How can I do?

Thanks.

  • I'm still very much learning Rails myself so not confident in this answer (hence leaving it as a comment), but could you use `match`? `match "users/auth/google_oauth2" => "login#index"` ? – Jack Franklin Jun 16 '12 at 14:31

1 Answers1

1

You can see how to change url prefix here How to change route of omniauth from /auth/:provider to /myapp/auth/:provider So it is almost what you need.

Community
  • 1
  • 1
freemanoid
  • 14,592
  • 6
  • 54
  • 77