AnswerBun.com

Using hooks in Joomla to add a Single Sign-On link in main page of Joomla

Joomla Asked by user11034850 on September 5, 2021

I have implemented SSO (Single Sign-On) in Joomla using OKTA and now my goal is to add a link in the main login page of Joomla using hooks.

To do this, I have added one checkbox in the service provider tab of Joomla and one column in the database to determine whether the checkbox is checked or not. If checked it will give a 1 value in the table otherwise false.

Now I have to add a link in the main page using hooks such that a like will be displayed if the value is 1 in the database; otherwise no link.

And I cannot find a function or class where I can do this same task.

NOTE: I cannot modify the login.php of the Joomla default template.
The plugin which I am using right now is miniOrange’s SAML SSO plugin.

One Answer

The easiest way to do what you are trying to accomplish is with template overrides, not plugin events (we don't call them "hooks" in Joomla). Ideally, you'd need to make a template override for com_users' login view and the mod_login module to make sure that both places where a user can log in are covered.

The reason I'm not recommending a plugin event is that Joomla 3 does not yet have a plugin event to add additional login buttons / links to the login page. This feature was added in Joomla 4 with my contribution of the WebAuthn plugin. The idea behind adding those events was your use case: Single Sign On implementations. But that's besides the point since Joomla 4 is still in beta.

As a side note, I wouldn't modify Joomla's database tables. It's not necessary. You can store additional per-user information in the #__user_profiles table. This is a more forward-looking approach, meaning that upgrading your site to Joomla 4 in a few months won't break your SSO implementation.

Answered by nikosdion on September 5, 2021

Add your own answers!

Related Questions

Getting Category’s custom fields in a blog view

1  Asked on September 5, 2021 by semaphore

   

How to post checkout data to component using Ajax?

1  Asked on September 5, 2021 by askerman

   

Display specific Joomla user groups

1  Asked on September 5, 2021 by niaziblog

   

how to get value for search in joomla module

1  Asked on September 5, 2021 by rhea-lorraine

   

Joomla installation on localhost using WAMP does not start

1  Asked on September 5, 2021 by bilal-kabeer-butt

 

Jquery script loaded on every page

1  Asked on September 5, 2021 by gag

   

category links don’t work

1  Asked on September 5, 2021 by giovanni-de-maria

         

Joomla 3.9 Child Sub Menu Not Showing

1  Asked on September 5, 2021 by ta1982

         

Trying to connect to an external ODBC data source

1  Asked on September 5, 2021 by irata

   

Can’t get a task to work from CLI

0  Asked on September 5, 2021 by tc0072

 

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP