garbage #_=_ in url after authenticated w Devise/Omniauth

161 views
Skip to first unread message

Erwin

unread,
Nov 14, 2012, 6:20:19 AM11/14/12
to rubyonra...@googlegroups.com
very strange ...  after being authenticated w FB/Google , the user is signe din and redirected to root_url 

In console :
>> Started GET "/users/auth/facebook?display=page" 
>> (facebook) Request phase initiated.
>> Started GET "/users/auth/facebook/callback?code=AQCHRMjDO......
>> (facebook) Callback phase initiated.
>>   Processing by Users::OmniauthCallbacksController#facebook as HTML
>>          Parameters: {"code"=>"AQCHRMjDOp2VW56_......
>>   User Load (0.6ms)  SELECT `users`.* FROM `users` 
>>    ...
>>        UPDATE `users` SET `last_sign_in_at` 
>>       COMMIT
 >>Redirected to http://lvh.me:3000/
>> Completed 302 Found in 3358ms (ActiveRecord: 3.2ms)

>> Started GET "/" for 127.0.0.1 at 2012-11-14 12:08:51 +0100
>> Processing by WelcomeController#home as HTML    # no action in welcome_controller#home , only display of a statuc home page view

Everything is fine BUT the url displayed in the browser is weird :   some garbage    http://lvh.me:3000/#_=_

any clue about where I should look into ?

thnaks

Erwin

unread,
Nov 14, 2012, 8:54:02 AM11/14/12
to rubyonra...@googlegroups.com
found a clue , but don't know yet how to get rid of it

Erwin

unread,
Nov 14, 2012, 9:16:09 AM11/14/12
to rubyonra...@googlegroups.com
[SOLVED]  it's a FB addition ....

[SOLVED] from FB ... Change in Session Redirect Behavior

This week, we started adding a fragment #_=_ to the redirect_uri when this field is left blank. Please ensure that your app can handle this behavior.

added to my application.js

if (window.location.href.indexOf('#_=_') > 0) { 

window.location = window.location.href.replace(/#.*/, '');

Reply all
Reply to author
Forward
0 new messages