I have a proje开发者_StackOverflowct using jQuery Mobile (uses resource identifier heavily) with Facebook authentication. Recently Facebook started adding #_=_
to callbacks (see here). This is killing jQuery Mobile.
Is it possible to do an automatic redirect for any routes matching #_=_
to the stripped counterpart? Is it possible to specify a resource identifier (#) when doing a redirect to? Any other possible fixes? I currently use a javascript redirect but this causes duplicate page loads and issues with some of the analytics.
Added in the following work around until Facebook fixes it (seems to work):
# app/controllers/omniauth_controller.rb
def create
...
js_redirect_to(user_path)
end
private
def js_redirect_to(path)
@location = path
render "shared/redirect"
end
# app/views/shared/redirect.html.haml
:javascript
window.location = '#{@location}'
精彩评论