Styling OmniAuth forms using Rails asset pipeline

Edgars Beigarts
MAKIT
Published in
1 min readDec 8, 2016
Default OmniAuth form layout.

OmniAuth allows to use custom CSS for forms using OmniAuth.config.form. However, this is limited to plain old CSS and you can't take advantage of SCSS and other goodies that Asset pipeline provides. To be able to use Asset pipeline you can use this small evil initializer config/initializers/omniauth.rb:

Now you can style your form however you like in app/assets/stylesheets/omniauth_form.scss.

Customized OmniAuth form layout.

--

--