Cross login
-
Thanks julian, I understand how should I set the userProfileURL now. I'll give a try. Still a question is how to add these two routes mentioned above?
According to the passport.js, it's used to make a request for getting the token. Is it not required?
-
@julian The keys is 'abc123' and secrets is 'ssh-secret'
I tried the new version plugin, but I get an error from the new code:
https://github.com/julianlam/nodebb-plugin-sso-oauth/blob/master/library.js#L33
The settings is undefined. -
Thanks for yours reply, but this plugin is "allows users to login/register via any configured OAuth provider".
In my case i don't want deploy an oauth provider only for this task. There is another way? For example a rest service that return to me a session cookie.
If i can do a curl post to the /login url with user, password and a valid token i solve my problem by adding programmatically the cookie to my session. Obviously to do this i must create a nodebb user programmatically, can i do that?
I've found this one http://community.nodebb.org/topic/916/shared-authentication-between-two-node-apps-when-using-mongodb#6564 -
@Paolo exactly you are right. I have the same purpose as yours. It's possible to persist the session in MongoDB and share between two node apps. I had tested this ways as well. However, it's quite more difficult than sso solutions, since you need to implement in your node app with all NodeBB User relevant stuff, maybe still groups and others. I tried to do that and it worked already. Now I found it's better to enable sso login and disable nodeBB local login.
For a simple oauth2 provider, you can find an example in the oauth2orize repository: oauth2 provider
For the client side, all you want is the plugin which Julian had implemented. -
@kevinprotoss thanks a lot for your reply, but unfortunately my other app isn't a node app so i can't use oauth2orize. However, i take a cue from your suggestions for a solution.