Yes you can use them inside the AMD module but keep in mind once you add an event listener on the window object it will be called everytime there is an action:ajaxify.end. If you don't want it triggered after you leave that page you need to turn it off with $(window).off('eventName', myMethod)
Implementing custom sso into NodeBB
I am affraid this question has already been post and i am sorry if it's the case.
I am currently implementing my custom sso into nodeBB which works. I only have one case where there is an issue. When i login with my custom sso, i check if the user has the permission to view the admin panel and i set "isAdmin" to true.
Everything work well but when i click on the admin button with my account logged in, i am redirected to the login page without my sso login. I don't really understand what is happening and i would like your help to understand what is happening
After 1st login:
After click on admin page:
This isn't the correct way to make that user an admin. If you want the user to be an admin, you need to add them to the
@pitaj Thanks for the help ! Was quite lost ^^
I still have same problem even after adding the user to the admin group.
Now, my user is in the admin group and if i try to access the admin pannel with this account, i am redirected to the login page without my sso login.
I am quite lost and i know i am doing something wrong but i cant find what
@maddoctor is your SSO plugin calling onSuccessfulLogin on completion?
I don't think it is necessary, but it is in older versions of NodeBB.
The problem you are seeing is that your freshly logged in account does not have a timestamp attached, and so the ACP wants you to relogin as a verification step.
Looks like a regression. If you don't have local password (sso login) it shouldnt ask you to relogin.