Codoforum related discussions
Getting CodoForum to use Joomla for user login

I'm trying to use the codoforum plugin to allow users to have a common login to the joomla and codoforum sites. Starting off running things locally.

I installed the plugin package into Joomla and created menu options for (the URLs are using the menu option names)

  • the component to use for "SSO Get User Path" value
       http://joomla.local/index.php/codoforum
    
  • login for "SSO Login User Path"
      http://joomla.local/index.php/codoforum-login
    
  • logout for "SSO Logout User Path"
      http://joomla.local/index.php/codoforum-logout
    
  • registration for "SSO Register User Path"
      http://joomla.local/index.php/codoforum-registration
    

For the joomla component, I created a client ID string and secret code that I added to the codoforum plugin (along with the URLs from the previous step).

Now if I click the login link in codoforum, it sends me to the joomla site login page (so that's good). But after logging in, I stay on Joomla (which isn't a surprise). When I go back to codoforum, it doesn't have me logged in.

And if I go to the get user path URL (which is the joomla component), I get an empty page.

And the URL to my local codoforum installation is:

What am I doing wrong?

thanks,

PS I've enabled the codoforum plugin.

I'm trying to use the codoforum plugin to allow users to have a common login to the joomla and codoforum sites. Starting off running things locally. I installed the plugin package into Joomla and created menu options for (the URLs are using the menu option names) - the component to use for "SSO Get User Path" value http://joomla.local/index.php/codoforum - login for "SSO Login User Path" http://joomla.local/index.php/codoforum-login - logout for "SSO Logout User Path" http://joomla.local/index.php/codoforum-logout - registration for "SSO Register User Path" http://joomla.local/index.php/codoforum-registration For the joomla component, I created a client ID string and secret code that I added to the codoforum plugin (along with the URLs from the previous step). Now if I click the login link in codoforum, it sends me to the joomla site login page (so that's good). But after logging in, I stay on Joomla (which isn't a surprise). When I go back to codoforum, it doesn't have me logged in. And if I go to the get user path URL (which is the joomla component), I get an empty page. And the URL to my local codoforum installation is: - http://codoforum.local What am I doing wrong? thanks, PS I've enabled the codoforum plugin.

search for the following in developer console -> network tab:

/codoforum_sso/user?callback

click on it and see the "Response tab".
you should see error messages if there are any.

search for the following in developer console -> network tab: ``` /codoforum_sso/user?callback ``` click on it and see the "Response tab". you should see error messages if there are any.
Necessity is the mother of all inventions!

I don't see that getting called at all.

Here's what I tried:

  1. went to codoforum.local (didn't see any calls to check if I was logged in)
  2. on codoforum.local, clicked "Login"
  3. it sent me to the joomla login page (joomla.local/where I logged into joomla
  4. went back to http://joomla.local/index.php/codoforum-login. I wasn't logged in and didn't see any calls out.

I tried that call directly (http://joomla.local/index.php/codoforum/user?callback) and it returned:

    ({"error":"client_id parameter is missing","token":"700e61de00fa1adaa5d79e5b37a09eea"});

which makes sense because I'm not passing any parameters in with it.

It seems like codoforum isn't making the call to check if a user is logged in. Now if I login to the admin interface and look at the plugin, the "disable" button is displayed (which I see as it means the plugin is enabled).

I don't see that getting called at all. Here's what I tried: 1. went to codoforum.local (didn't see any calls to check if I was logged in) 2. on codoforum.local, clicked "Login" 3. it sent me to the joomla login page (joomla.local/where I logged into joomla 4. went back to http://joomla.local/index.php/codoforum-login. I wasn't logged in and didn't see any calls out. I tried that call directly (http://joomla.local/index.php/codoforum/user?callback) and it returned: ```` ({"error":"client_id parameter is missing","token":"700e61de00fa1adaa5d79e5b37a09eea"}); ```` which makes sense because I'm not passing any parameters in with it. It seems like codoforum isn't making the call to check if a user is logged in. Now if I login to the admin interface and look at the plugin, the "disable" button is displayed (which I see as it means the plugin is enabled).

I think I know what went wrong, you should be referring to the component directly.

SSO Get User Path

http://joomla.local/index.php?option=com_codoforum

make sure client ID and secret Code is same in both Joomla and Codoforum.
make both client ID and secret Code as 1234 in both Joomla and Codoforum, just to be sure.
you can change them later

I just tried with the latest version of Joomla and everything worked perfectly.

I think I know what went wrong, you should be referring to the component directly. **SSO Get User Path** ``` http://joomla.local/index.php?option=com_codoforum ``` make sure `client ID` and `secret Code` is same in both Joomla and Codoforum. make both `client ID` and `secret Code` as 1234 in both Joomla and Codoforum, just to be sure. you can change them later I just tried with the latest version of Joomla and everything worked perfectly.
Necessity is the mother of all inventions!

hmmmm. Didn't do it. Let me recap.

SSO Name, SSO Client ID, SSO Secret are all 1234 (& Joomla is configured the same).

Then for the links, I turned off SEF to be sure there aren't surprises:
get user: http://joomla.local/index.php?option=com_codoforum
login: http://joomla.local/index.php?option=com_users&view=login&Itemid=104
logout: http://joomla.local/index.php?option=com_users&view=login&layout=logout&task=user.menulogout&Itemid=105
register: http://joomla.local/index.php?option=com_users&view=registration&Itemid=106

When I go to the codoforum.local and click login, it takes me to the joomla login page.
After logging in to joomla, I stay on the site.

When I enter codoforum.local to get back to it, it doesn't know I've logged in.

If I login to the codoforum admin backend, then go to the codoforum front page, it recognizes I'm logged in.

And lastly, if I go to http://joomla.local/index.php?option=com_codoforum, it just shows a blank page (regardless of whether I'm logged in or not) - and no errors reported.

hmmmm. Didn't do it. Let me recap. SSO Name, SSO Client ID, SSO Secret are all 1234 (& Joomla is configured the same). Then for the links, I turned off SEF to be sure there aren't surprises: get user: http://joomla.local/index.php?option=com_codoforum login: http://joomla.local/index.php?option=com_users&view=login&Itemid=104 logout: http://joomla.local/index.php?option=com_users&view=login&layout=logout&task=user.menulogout&Itemid=105 register: http://joomla.local/index.php?option=com_users&view=registration&Itemid=106 When I go to the codoforum.local and click login, it takes me to the joomla login page. After logging in to joomla, I stay on the site. When I enter codoforum.local to get back to it, it doesn't know I've logged in. If I login to the codoforum admin backend, then go to the codoforum front page, it recognizes I'm logged in. And lastly, if I go to http://joomla.local/index.php?option=com_codoforum, it just shows a blank page (regardless of whether I'm logged in or not) - and no errors reported.
131
5
3
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft