How to override the login action to a custom JS call?

(Caê Penna) #1

I am building an application and the login won’t be a redirect link but a action that opens a sidebar. Does anyone have a clue how I could do that?

(images below to show how the login would be)

(Caio Viotti) #2

I’m working on this too with Caê.
Actually any action that is required you to be logged in to work (like leaving a reply), instead of opening the default login modal or redirecting you to a custom SSO URL, we’d like to fire a custom JS function that triggers our sidebar to open.
I’ve quickly looked over Discourse’s source code and it seems that would be possible if we could override the handleShowLogin() function. Is this possible at all?

(Caio Viotti) #3

I assume this might be less simple than expected. Any insights or first steps at least? Is this something a custom plugin would solve? We just like to know what path to start following. :sweat_smile: