Oh, and thank you.
On Saturday, April 19, 2014 6:42:58 AM UTC-7, Ephraim Feig wrote:
>
> Rob,
>
> Cookie, of course. Done!
>
> BTW, nothing in request.env["omniauth.params"], either.
>
> Ephraim
>
> On Friday, April 18, 2014 4:42:20 PM UTC-7, Rob Kaufman wrote:
>>
>> Hi Ephraim,
>> The problem arises because you're login request goes like this
>>
>> Link on page => Auth#Facebook controller action => in browser redirect
>> page => Facebook (here be dragons) => Auth#facebook_callback (or something)
>> You loose the param either during the redirect or in the dark heart of
>> Facebook.
>>
>> Things to try:
>>
>> 1) Check request.env["omniauth.params"] in the return action. Your
>> original param might be hiding there.
>>
>> 2) Save the value to a cookie and then retrieve it when you come back
>>
>> Also you've got an extra "?" in your example code
>>
>> <%= link_to image_tag("FB_logo2.png"),
>> "/auth/facebook?param1=#{temp_user_id}?" %>
>>
>> should be
>>
>> <%= link_to image_tag("FB_logo2.png"),
>> "/auth/facebook?param1=#{temp_user_id}" %>
>>
>>
>> On April 18, 2014 at 14:19:58 , Ephraim Feig ([email protected]) wrote:
>>
>> I my application, I have users enter some information, and only then do I
>> allow them to register. I want to give them the option of either
>> registering directly or conveniently with Facebook. I use Omniauth (I don't
>> use Devise). I save the information they already have entered, and then I
>> want to augment it with other stuff after they sign in. I give them a
>> temporary id (random number), which I want to pass to Omniauth so that when
>> they finish registering with Facebook, I can find their temporary record
>> and do with it what I want.
>>
>> Basically, I want to use something like this in my view:
>>
>> <%= link_to image_tag("FB_logo2.png"),
>> "/auth/facebook?param1=#{temp_user_id}?" %>
>>
>> The generated url then is this (I am in development in my local machine)-
>>
>> localhost:3000/auth/facebook?param1=3458768267844234
>>
>> When I click the link, this is what happens (from my debugger)-
>>
>> Processing by OmniauthsController#create as HTML
>> I, [2014-04-18T14:12:03.871319 #85797] INFO -- : Parameters:
>> {"code"=>"AQDncNYL_i77fF6_PZgaY6J00LdDWNooKaSVUd8mDKUTnmxLCa5yhZR3zkkg6GoSlelDGYMhygjtL7XrsC_p9KPBWxqmZvbndeanqx_ERqiR075tMlnCOjbXacLwLM4iHIxs55j7o9iZekbCxMJvIZycWKR2gUFM6TIKv5FJOFLGIalU8MLaOSMpqPhGAObw3hs0RfOKl32X0Rs4SH21PaYfiTCfUeQk4Hj64qz8jtxJg1oPkzEObTTX99iag_PiNBEmhiq-Z6Vn44wlqjWR4_iFCFpMhkASNcJ8bvQt6gRfVByTXUzZ1GF1h_avXF7dokU",
>>
>> "state"=>"829dda5baa64b1531563c1a5f2e00789281a1c23289ebcf0",
>> "provider"=>"facebook"}
>>
>> I get all the usual Omniauth parameters that I would have gotten without
>> the added param1, but param1 is not passed along.
>>
>> Thank you for any help here.
>>
>> Ephraim
>> --
>> --
>> SD Ruby mailing list
>> [email protected]
>> http://groups.google.com/group/sdruby
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "SD Ruby" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
--
--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
---
You received this message because you are subscribed to the Google Groups "SD
Ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.