commandocoding / openid-selector

Automatically exported from code.google.com/p/openid-selector
0 stars 0 forks source link

clicking a new openid logges you into the old one #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Changing the else condition of the signin function to :

        } else {

            openid.provider_url = provider['url'];
            if (! onload) {
                $('#openid_form').submit();
            }
        }

Fixes it for me.

The problem is that the submit function overwrites the hidden url field
with your cookie's provider instead of the one the user clicked on.

Original issue reported on code.google.com by ptar...@gmail.com on 6 Jul 2009 at 9:18

GoogleCodeExporter commented 9 years ago
You can also make the following modification to setOpenIdUrl:

Change this:

hidden.value = url;

To this:

hidden.val(url);

Original comment by jonsag...@gmail.com on 6 Aug 2009 at 4:22

GoogleCodeExporter commented 9 years ago
I've made you a committer, please commit the simplest change possible to fix 
this 
issue. Thanks.

Original comment by david.j....@googlemail.com on 6 Jan 2010 at 11:24

GoogleCodeExporter commented 9 years ago
Applying changes suggested by jonsagara fixed the problem on Firefox, but 
Chrome 
(5.0.307.9 beta, Linux) was still behaving incorrectly. 

It looked like adding hidden button at runtime didn't work. I changed 
type="hidden" 
to style="display: none"--ugly, but seems to have fixed the issue:

    setOpenIdUrl: function (url) {
        var hidden = $('#'+this.input_id);
        if (hidden.length > 0) {
            hidden.val(url);
        } else {
            $('#openid_form').append('<input style="display:none" id="' + 
this.input_id + '" name="' + this.input_id + '" value="'+url+'"/>');
        }
    }

Original comment by cuu...@gmail.com on 25 Feb 2010 at 2:44

GoogleCodeExporter commented 9 years ago
fixed in trunk and future v1.1

Original comment by andriy.gerasika on 1 Oct 2010 at 2:58