Embed vanilla plugin not working

infoarmyinfoarmy Member
edited May 2012 in Questions
Hi,

I am using Embed venilla plugin in our website. I am embedding remote.js in one of our pages. I created a js connection. My Authentication URL is invoked with below params

http://localhost:8080/auth.htm?client_id=434343443&Target=categories&callback=jQuery16206380734976463187_1337174709078&_=1337174710611

timestamp and signature are not passed here. Also even if i return

"jQuery16206380734976463187_1337174709078({ "uniqueid": "1000000", \"name\": \"fname lname\", \"email\": \"vanilla@vannila.com\", \"photourl\": \"http://www.tineye.com/images/widgets/mona.jpg\", \"clientid\": \"434343443\", \"signature\": \"5787889898ffffddf343443\" });"

its showing login screen not the home page for our forums. Any support would be appreciated.

Infoarmy

Comments

  • Hi @infoarmy, are you testing from the same computer that you're using as localhost?

    Are you using the client library we provide? https://github.com/vanillaforums/jsConnectPHP

    I can't troubleshoot your connection's response if it's on localhost. Is it possible to move it to a live webserver?
  • Currently I am not able to move it to live webserver.

    Yes I am testing from the same computer. I am using jsConnect.java. Also I just embedding in a jsp. I gave you query params and query reply.

    Test URL is returning results as below

    Request:

    http://localhost:8080/auth.htm?client_id=940788312&timestamp=1337180664&signature=79bece9ea25d60647da8833f49608&Target=/settings/jsconnect&callback=test

    Response:

    "test({ \"uniqueid\": \"1000000\", \"name\": \"fname lname\", \"email\": \"vanilla@vanilla.com\", \"photourl\": \"http://www.tineye.com/images/widgets/mona.jpg\", \"clientid\": \"940788342\", \"signature\": \"79bece9ea25d60647da8833f49608\" });"

    Let me know for additional information.

    Infoarmy
  • ToddTodd Staff
    A couple of things:

    1. jsConnect does not pass a timestamp and signature when it is just requesting the user's name and picture. It passes this additional information when you click to login.

    2. If you are logged in to your external site and click login then it sends the extra information. If after this you are presented with the sign in page again it could be because your default member role doesn't have permission to sign in to Vanilla, so it's connecting you, but then you get booted back out due to lack of permission.
  • http://vanillaforums.org/page/SingleSignOn

    As per the above documentation, if I login into forum after logging into my site, vanilla forums will create a user with the given username/email in forum.

    Below is the scenerio that I am facing.

    I have an user vanilla@vanilla.com in my site. I login into my site with this user. After logging in, if I load remote.js script, my http://localhost:8080/auth.htm (jsConnect authentication URL) is executed. I respond with the necessary details for example email/name/uniqueid etc. I expect a new user to be created in Vanilla forum, and the forum should allow vanilla@vanilla.com to login into forum seamlessly. But its showing me login page of vanilla forum. Any help pages would be highly appreciated.

    Infoarmy
  • Hi,

    I changed my plugin into forum embed instead of embed vanila. And I am using below script since embed vanilla is depricated.



    Also I added role=Administrator in my reply.

    "jQuery162018526130967386567_1337248479749({ \"uniqueid\": \"1000001\", \"role\": \"Administrator\", \"name\": \"D User\", \"email\": \"d@infoarmy.com\", \"photourl\": \"http://www.tineye.com/images/widgets/mona.jpg\", \"clientid\": \"9407883443342\", \"signature\": \"663b93743e08190ba2cdbf0da\" });"

    But i am seeing login form instead of discussion screen.

    regards
    Infoarmy
  • Hi,

    We moved my application into live webserver. I disabled private community for infoarmy forums. So I think role is not needed in the json reply.

    http://124.124.89.221:8080/authenticate.htm

    You shall use this above url to test whether our server is working fine or not. Le me know if you need more details.

    regards
    Infoarmy
  • Any help would be appreciated??? Experts Advice??
This discussion has been closed.