i own my nodebb, i want to use a third-part id to login to my nodebb.
what must i do?
is there api docs ?
Depends what third-party login you want to enable. Check plugins for some common options (Facebook, Google, etc.)
The best solution would be to expose your login process as an OAuth endpoint, via something like OAuth2orize, and then install a corresponding fork of this SSO plugin to talk to your endpoint.
I am guessing on all of this, never done it before
It sounds as if you want to override the local login strategy rather than provide an SSO service.
To do this you need to provide a local login strategy to passportjs during that hook, just as the core does here:
Instead of controllers.authentication.localLogin, use your own callback function. It is passed (req, username, password, next) just as it is here.
You would essentially the same thing that function does, but instead of using the local user info, use your own database to compare the username/passwords too.
If the login is successful, you need to create a local user and attach an ID from your database entry to the user's local database entry, so you can look that up when the user logs in again.
Also in the admin panel, change the registration type to none, so that users are required to have an account at your existing db.
...so if you exit to the site on one tab, then on the other you are still logged in.
It looks quite strange -
As you can see, we can be a partial activity in exit. The session was completed.
@julian @baris @psychobunny
I am able to solve this issue. I needed to add checks in map.tpl instead of relying upon pure client-side JS solution.
Creating a soft link to the images directory works.