简体   繁体   中英

Omniauth-Facebook Redirect to signup form - Rails 3.2

I have an existing signup form that handles users that want to sign up with an email, username and password. I want to have the option to also signup using Facebook. I've managed to get the auth part working fine, but when auth is given by the FB app, I want to redirect back to the same sign up form so users can add continue signing up with a username / password (and add other options in the sign up form) - so really signing in with Facebook can be an option - but they can also sign in with the username and password. Is this possible? Im using the omniauth-facebook gem at the moment, but dont't really know how to re-direct to the user#new controller or where to store the data that comes back from facebook.

Here's a gist with both the user controller and a sessions controller .

尝试

redirect_to request.referrer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM