For anyone else that may find this post and is struggling, this step by step walkthrough really helped me out (at least regarding the php oauth2 server) http://bshaffer.github.io/oauth2-server-php-docs/cookbook/
KingCat
Posts
-
[nodebb-plugin-sso-oauth] How to associate with current logged in user. [solved] -
I want to use another website to register to my nodebb website@raven Right now the only supported way to do what you want is to create an Oauth service and authenticate against it using the plugin @psychobunny linked. It's far from ideal but it seems to be the only way unless you want to start hacking into the internals of nodebb or create another plugin from scratch.
Yes, It sucks. I wish I would have known this before I started down the path of using nodebb
-
Read-only authenticated API access from external site?Is there any way to access the read-only built-in api from an external site with programmatic authentication?
My forum is private so everything is restricted to logged in users only. This means If i want to integrate a "recent posts" display widget on my main site it wont work because the API call to mysite.com/api/recent will fail due to lack of a login cookie. I know with the write-api you can generate tokens and api keys but that api doesn't include any read-only endpoints (which i think is a huge oversight btw, at the very least it should allow you authenticated api access to endpoints that are traditionally locked down, like /api/user/:userid:). Is there any way to achieve this without making huge modifications to the write-api plugin?
-
400 and 522 errors since enabling SSL via Nginx proxySo everything was working great but due to the nature of my site and it's users, SSL is required, especially since I'll be using SSO exclusively for login. Once I enabled SSL I started receiving both 400 and 522 errors on a certain amount of the socket.io polls. I'm not certain what the percentage is of failed polling attempts but it's not 100% because the site still works and some data still makes it through.
Here's a screenshot of the errors in my safari console (yes, it happens in chrome and firefox too)
And here's my nginx vhost config
server { listen 80; server_name forum.nzb.cat; return 301 https://forum.nzb.cat$request_uri; } server { listen 443 ssl; server_name forum.nzb.cat; ssl_certificate /etc/nginx/ssl/forum.nzb.cat.crt; ssl_certificate_key /etc/nginx/ssl/nzbcat.key; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:4567/; proxy_redirect off; # Socket.IO Support proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } }
And here's the error in the nginx error.log. I googled and googled and did everything the stack overflow people suggested to no avail:
2015/04/12 10:39:03 [error] 17037#0: *146836 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: forum.nzb.cat, request: "GET /socket.io/?EIO=3&transport=polling&t=1428849532722-383&sid=ECw2nTDnOQgEjGcdAAKp HTTP/1.1", upstream: "http://127.0.0.1:4567/socket.io/?EIO=3&transport=polling&t=1428849532722-383&sid=ECw2nTDnOQgEjGcdAAKp", host: "forum.nzb.cat", referrer: "https://forum.nzb.cat/"
I'm at my wit's end here so any help would be appreciated. I didn't bother commenting out any of the URL's as it's a public site.
-
[nodebb-plugin-sso-oauth] How to associate with current logged in user. [solved]@julian Thank you so much for your help. I finally got it working. I had to ditch the intermediary auth server and integrate oauth2-server-php directly into my application so I could associate the currently logged in user with the authentication dance.
Thanks again for your help, I was really confused.
-
400 and 522 errors since enabling SSL via Nginx proxy@julian said:
It's cloudflare. Keep using it, but disable acceleration. Websocket issues will be fixed.
I did what you suggested and it seems to have fixed the issue in chrome. However in safari it still happens. I'm gonna wait a while and see if maybe safari just has something weird cached (even though i cleared browser and dns cache).
-
[nodebb-plugin-openfantasy] Full-fledged RPG system for NodeBB@psychobunny I've always wanted to make a browser based rpg but never had the wherewithal to create something useable, I think this way I can scratch my itch without having to create all the underlying plumbing haha.
Also, I'm in the nodebb IRC on freenode if you ever want to come by and chat about it.
-
Sharing Windows Server with Nodebb and WordpressBest of luck to you @RichG. I did quite a bit of windows admin with IIS back in the day but I couldn't explain to you now how to do it without being on your system.
If you still can't get IIS to play nice, may I suggest giving WAMP a try? It's basically the most popular linux web server: Apache, on windows. It will allow you to stick with windows but also use the suggestions and instructions from the nodebb documentation to get your proxy pass setup correctly. Additionally, configuring wordpress to use Apache instead of IIS is trivial.
If you decide to go this route I can walk you through setting up apache and the vhosts required, just start a chat with me here.
-
400 and 522 errors since enabling SSL via Nginx proxy@Schamper Haha yep. I may be the KingCat but even I need support sometimes
-
Group tag not displayed by default on posts.@Codejet Yea, I saw your post and almost replied but I thought since @psychobunny said it might be a bug it's worthy of it's own thread.
Multiple group tags and group tag weighting would be nice but right now I'm just trying to get everything that "should" work working so I can open the forum to the users.
-
400 and 522 errors since enabling SSL via Nginx proxyWelp, I solved it.
Turns out I had the wrong directory specified in nginx for static assets. It was pointing to a different install of nodebb. For some reason that caused issues with socket.io (and only with safari/opera for some reason).
Now, here's the weird thing. I only recently started using nginx to serve the assets. Recently as in like this morning. Before that I simply had a proxy pass setup and let nodebb serve the assets. I'm not sure what was causing the 400/502 errors then but I'm just glad their solved now.
-
The themes are mixed - Now Nodebb don't work - Help Me.@XenTerSeO All I did was look at which themes were installed, if they weren't the active one, I deleted them. By deleting I mean I did an npm uninstall nodebb-theme-lavender, etc after disabling them in the ACP.
-
The themes are mixed - Now Nodebb don't work - Help Me.@XenTerSeO said:
@KingCat said:
@XenTerSeO All I did was look at which themes were installed, if they weren't the active one, I deleted them. By deleting I mean I did an npm uninstall nodebb-theme-lavender, etc after disabling them in the ACP.
Unfortunately it does not help the change already established template.
Whenever you add or change the code installed themes have to clear the cache.Have to wait for the official fix.
I'm not exactly sure what you're saying here but whenever you restart nodebb it should re-generate all the css and javascript used. Removing those themes and then doing a restart should take care of the issue.
If you're having the exact same issue as me with the container being turned into container-fluid I can help with that, just let me know.
-
The themes are mixed - Now Nodebb don't work - Help Me.@XenTerSeO First, I believe you are correct, vanilla may be required for persona, I didn't delete that one.
Second, that issue is only temporary, It should fix itself once you close the browser window and revisit the site. Also hitting shift+refresh will force your browser to re-download all the assets. I'm pretty sure nodebb has it setup to cache the assets on the browser for a day or two.
-
The themes are mixed - Now Nodebb don't work - Help Me.Ah yea, then I'd recommend using a development environment. It's never smart to make design-breaking changes to your production installation.
Also, I have many problems with the theme I used so I utilized the custom CSS option in the ACP. It gets included on every page after the other css files so you can overwrite and directives and it applies immediately, no cache necessary.
-
The themes are mixed - Now Nodebb don't work - Help Me.A development environment is a secondary install of nodebb that your users don't know about. Maybe it's installed on your local computer or on a cheap VPS somewhere on the internet. It's primary purpose is to contain volatile changes to your site. You can do whatever you want, break it, tear it down, reinstall from scratch, etc and your users are unaffected.
So you do your changes to your templates, get them looking exactly how you want and everything working right. Then you push those changes to your production server and display them to your users.
-
The themes are mixed - Now Nodebb don't work - Help Me.You're welcome. I hope you get it working how you want it
-
Why do I even bother upgrading??Sorry for the necropost but I'm just now getting back into this. I was so upset I had to take some time to cool off. I was upgrading from 1.1.x to 1.5.1 and I guess that was what the issue was. If i could just go back to the old way it was and forgo upgrading I would. I did backup the database but not the node_modules so I have no idea what was installed and what version.
Is there any way to tell what version of nodebb was installed by looking in the database somewhere? It's a redis DB btw if that matters. I opened the dump file on my workstation and poked around looking for some info but the current nodebb version didn't seem to be included anywhere.