Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

[Solved] jsConnect is not creating a User - Misconfiguration?

businessdadbusinessdad Stealth contributor MVP
edited July 2012 in Vanilla 2.0 - 2.8

Hi all,
I installed jsConnect on my development forum and created, with a good deal of cursing, a page that returns the details of the logged in user on an ecommerce (the awful Magento framework). I made some tests manually, and I can see that the User Data is returned correctly. I also used the Test URL in Vanilla, and I can see the details.

When I go to the forum, I can see the button "Sign in with Test Ecommerce" (i.e. my ecommerce), but it doesn't do much. Actually, it doesn't do anything.

My doubt is that I could have misconfigured jsConnect on Vanilla. In fact, I'm not sure of what should I enter in fields Sign In Url and Register Url. I tried entering the Sign In and Register Urls of the ecommerce, but then, when I click on the Sign In button, it just goes to the User Control Panel on the ecommerce, since user is already logged in, and nothing happens. User doesn't get created in Vanilla and, obviously, he doesn't get logged in.

Additional note
I just noticed that, if I log in on the ecommerce, then I go on the forum, the message I get is "Howdy, Stranger!". Shouldn't it show my ecommerce User Name, or my name instead?

It's clear that I'm missing something. Any help is greatly appreciated, thanks.

Answers

  • businessdadbusinessdad Stealth contributor MVP

    I discovered something else: it seems that Vanilla is invoking a JavaScript to connect to my server. Such JS looks for a hidden input field named JsAuthenticateUrl, which doesn't exist in the page. I then checked the plugin code, and I can see that such hidden field is added by method JsConnectPlugin->EntryController_JsConnect_Create(). However, such method is never called (for sure not when someone opens the home page).

    I have the feeling that there's something really wrong somewhere, but now I'm no longer sure it's just the configuration, I'm afraid it could be the plugin itself.

  • businessdadbusinessdad Stealth contributor MVP

    One further discovery. I read another discussion about jsConnect plugin, and I noticed one difference from what the other user states. He wrote "IF I AM logged onto my CMS [...] it opens another small window (NOT a tab) and then opens Vanilla forums". In my case, clicking on "Sign In with" button does not open any window, it just goes straight to the Ecommerce website. I double checked popup blockers and every plugin which could interfere, with no result.

    For comparison, I tried to enable OpenId plugin and it actually opens a popup window, which it automatically closes.

    I'm starting to think it's a bug of some sort.

  • I have a similar qualm about the login and register urls, my configuration is probably much different than yours, i'm using codeigniter. i have to say that i don't think it's the plugin, quite a few others have successfully used it... that being said, it's seems to be a much larger undertaking than they would have us believe, i've got my setup to the point where it clicking on the "sign in with.." link dumps the correct json, but i'm stuck there, if anyone could weigh in here, the community would greatly appreciate the support.

  • businessdadbusinessdad Stealth contributor MVP

    @b3457m0d3 I don't think the fact you use CodeIgniter would make much of a difference, as Vanilla would be the same. Based on the documentation, the only thing our website/application has to do is provide a JSON result, containing some User data.

    The plugin I developed for my ecommerce does exactly that, and, if I run jsConnect test, I get the expected result. I therefore assume I've done everything correctly, which makes me wonder why it doesn't work.

    Regarding your statement, "clicking on the link dumps the correct json", may I ask you how did you test it? I can't find out if and when Vanilla is trying to contact my site, and, therefore, I can't see what's happening.

  • @businessdad i get the proper json both when clicking test on my vanilla backend, and when going directly to the auth url, i too am stuck here, the json is there where its supposed to be, but nothing i've found, including others "apparently working" examples have given me the slightest inkling of what to do next.

  • businessdadbusinessdad Stealth contributor MVP

    @b3457m0d3 I get it now. That was the same test I made, and it worked the same way. I really don't understand what's missing. It must be something essential, yet "obscure".

  • businessdadbusinessdad Stealth contributor MVP

    Still no progress on the issue. Clearly, I can't understand how the plugin is supposed to work.

  • businessdadbusinessdad Stealth contributor MVP
    edited July 2012

    I finally solved the issue! To avoid duplication, please refer to the reply posted in another thread.

Sign In or Register to comment.