Does NodeBB provide support for a user database other than the one it builds in mongo? How would I integrate NodeBB with Keycloak?
-
@David-Sargrad You're seeing a 500 error, which means it's the right URL but something happened on the backend. If it was the wrong URL it'd be a 404
If you modify a backend file, you have to restart NodeBB (but you don't have to rebuild). The files are cached (by Node.js) so you need to restart NodeBB so the cache is empty.
-
i see.. for some reason the console.log didnt go to the console.. that said.. i'm at the breakpoint where the console.log is ...
This is my payload object: -
I see.. You are too good!
SO the @ in the handle is problematic?
-
Yeah, I'm not immediately certain why
@
was omitted, but this is an excerpt of the expression that defines what characters are allowed:'" \-+.*[\]0-9\u00BF-\u1FFF\u2C00-\uD7FF\w
Some symbols, numbers, letters, and select unicode ranges. Gone are the days when the expression used to be
^\w+$
-
I see.. Now to see if Keycloak allows me to modify that.. I'd assume so.
-
any idea why the console.log didnt actually go to the console? odd .. since the code seems to be there.
-
Heh.. yea.. i love to single step debug when its an option.. gives quick insights into code design
-
@julian Success!! I logged in with a new account: handle poodle
Works with keycloak so far!!
-
What defines this convention? Is this an OAuth2 convention on the handle restriction?
'" -+.*[]0-9\u00BF-\u1FFF\u2C00-\uD7FF\w
-
I see.. well awesome Julian.. so far so good.
-
Now that I've verified that a user registered in Keycloak can login to nodebb properly, what API call can I make to automatically log that user in, when that user successfully logs in to our application?
-
The thing about SSO is that it's being used as an authenticator (or is it an authorizer? I always get them confused). So we can't really automatically log the user in because we don't know they're logged in on your end.
However, something custom could be built, whereby if we detect a specific cookie, then the redirection happens? That'd be outside the scope of the plugin, however.
-
@julian i've discussed the limitation that says @ is not a proper username character with my team. We literally have requirements from our customer that say an email address must be a username. Would you guys be open to implementing a change, and allowing @? We are hoping that you see this as a sensible nodebb modification.
-
@julian Ty! It would be great to add support for usernames that are email addresses. In retrospect this is actually a fairly common practice.
-
@David-Sargrad as it turns out it's likely more difficult than just a single change. It would likely conflict with the mentions plugin.
It's possible you could just adjust the regular expression locally until we are able to add this in for you.
Edit: it may conflict, we don't know