0

I'm using omniauth-facebook gem for facebook authentification and registration. When you complete registration with facebook, it automatically creates password for you. I want when omniauth get all needed data - automatically redirect to page where user can set password or cancel registration if password wasn't set. How can i implement custom strategy like this?

Src
  • 5,252
  • 5
  • 28
  • 56

1 Answers1

0

You will want to redirect to a page after successfully signing up?

Try looking through devise's documentation on the subject: https://github.com/plataformatec/devise/wiki/How-To:-Redirect-to-a-specific-page-on-successful-sign-up-%28registration%29

Taryn East
  • 27,486
  • 9
  • 86
  • 108
  • Thank you for reply, but the problem is that on the moment i've got redirected, account already created. I need some condition like: If user successfully signup using Facebook make them set custom password. And if password is not set ( person closed browser page or clicked cancel ), cancel whole registration. – Src May 13 '15 at 20:26
  • put a validation on the user-model that requires the password to be set. Then add the password field to a custom devise registration form – Taryn East May 14 '15 at 03:51