devise skip authentication based on route

Viewed 13376

Having devise_for :users makes all methods of Users controller authenticated by Devise. I'd like to skip a couple of methods e.g users#api, users#do_stuff for making a public API with self-written auth method.

How can I do it?

UPDATE.

skip_before_filter :authenticate_user!, only: [:api, :do_stuff]

still gives me {"error":"You need to sign in or sign up before continuing."}

2 Answers
Related