jsconnect

dreeddreed Member
edited December 2011 in Questions
1)how should JsConnect behave when a user has already signed into my website and then clicks on a link from my website to go to mywebsite.vanillforums.com
2)when the user directly goes to mywebsite.vanillaforums.com and clicks on the Sign in with doughmain button

Comments

  • Right now in case 1. the user is not logged in into mywebsite.vanillaforums.com and in case 2. the user clicks on "sign in with mywebsite" and logins into mywebsite but is not signed into mywebsite.vanillaforums.com
  • ToddTodd Staff
    edited January 2012
    1) You will not automatically be signed in to the forum if you are signed in to your site. You can make the forum on your link point to http://doughmain.vanillaforums.com/entry/jsconnect?clientid=2055217326 to make it check the SSO. We can also make a more friendly url for you if you wish.

    2) Your signin page needs to have the ability to redirect back to the forum. Most sign in pages do this with a querystring parameter such as ?redirect=. If you have this then you can specify it in your jsConnect settings with ?redirect={Target}. jsConnect will replace {Target} with the correct url.
  • 1) currently I have embedded the forum on one of the pages on my website; how can make it work in this case

  • how can i make jsconnect work with the embedded forum
  • What part of the setup is giving you trouble?
  • I have explained my problem above and I still don't know how to solve it
  • dreeddreed Member
    edited January 2012
    1) the code to embed vanillaforums in one of the pages on my site:
    <script type="text/javascript" src="http://doughmain.vanillaforums.com/plugins/embedvanilla/remote.js"></script&gt;

    where should I use http://doughmain.vanillaforums.com/entry/jsconnect?clientid=2055217326 ?


    2) I have the param set as redirectTo rite now; is it possible to use ?redirectTo={Target} instead of ?redirect={Target} ?
  • 1) If you have a sign in page on your forum (not within Vanilla) you use this link.
    2) Yes, you can use redirectTo={Target}. We just replace {Target} with the appropriate url.
  • dreeddreed Member
    edited January 2012
    1)
    As far as I understand; when a signed in user clicks on the "http://doughmain.vanillaforums.com/entry/jsconnect?clientid=2055217326" link jsconnect calls the authenticate url from the settings to get the json string and then logs in the user in mysite.vanillaforums but in the case of embedded vanilla forums the forum is loaded in one of my website pages with the script:
    <script type="text/javascript" src="http://doughmain.vanillaforums.com/plugins/embedvanilla/remote.js"></script&gt;
    So how can I tell jsconnect know when to call the authenticate url?
  • Sorry I missed this. Vanilla specifies its initial url after the # symbol so you should be able to add #/entry/jsconnect?clientid=2055217326 after the url on your containing page.

    I'll give this a try on my localhost since it looks like your site is jsConnecting to your own localhost and confirm that it works.
  • bdailybdaily Member, Commenter
    I assume you mean the SSO Client ID. where would this url be found so that I can add "#/entry/jsconnect?clientid=" ?
  • Howdy @bdaily, what's the URL of your Vanilla Forum?
  • shacharsolshacharsol Member, Commenter
    I have the problem that after the user is logged in via jsconnect or registered in the vanilla embedded frame. the page url is not redirected to the discussions page it remains in the login screen. i tried redirect and redirectto and target, any idea how to redirect it after the jsconnect finishes?
  • Hi @shacharsol, can you point me to your vanillaforums.com hosted account if you have one? If you're using the downloadable version, then try seeking assistance from the community on vanillaforums.org.
This discussion has been closed.