4,730 Experience
47 Lessons Completed
0 Questions Solved


@Andrew Ah thanks! I had to create a button_to outside of the form as a work-around but this is much better.

I added a guard to make sure unauthenticated users could not trigger the OmniauthCallbacksController#twitter action

before_action :require_signin

where require_signin is a private method I defined in application_controller

It worked perfectly, thank you!