Closed joyhope closed 2 years ago
When you try to log in or when you are logged? Because this plugin should not touch anything when the user is connected to the nodebb forum.
As long a NodeBB is aware of your connection, reverse proxy or not, I should not change anything.
This plugin should print debug messages if the forum is started like this, can you try?
./nodebb dev
Login is a success. It seems it is related manifest process.
It seems no related to the plugin, but how to properly setup the nginx.
Good to know, thanks for the update!
I am still unable to solve the plugin. If I disable the plugin,
The login will redir to http://xxx?loggedin=true
When I activate the plugin, it will use ?loggedin=true, and then jump http://xxx/manifest.webmanifest?loggedin=true (It is written in ?loggedin=true Location in header)
It seems the plugin changed the first URL:?loggedin=true behavior, and then the NEW behavior is not processed correctly.
The problem may be related with nodebb plugin arch.
I also contact nodebb: https://github.com/NodeBB/NodeBB/issues/10258
but I did not understand where is the problem.
dev log, after login.
2022-02-07T14:36:29.267Z [4567/49233] - verbose: [plugin-nodebb-private-forum] User is logged or URL is allowed (/manifest.webmanifest?loggedin=true), no redirect.
2022-02-07T14:36:29.270Z [4567/49233] - verbose: [plugins/fireHook] filter:manifest.build
2022-02-07T14:36:31.095Z [4567/49233] - verbose: [plugins/fireHook] filter:middleware.autoLocale
2022-02-07T14:36:31.096Z [4567/49233] - verbose: [plugin-nodebb-private-forum] User is logged or URL is allowed (/service-worker.js), no redirect.
As you can see here, the plugin does not block the manifest file. For me this should not cause any trouble. Does it work correctly without the plugin?
without plugin , it works correct. As I said, after register, it jump to ?loggedIn=true, works. but with plugin in, it also jump to ?loggedIn, but there is a Location in head, it contains web.manifest?loggedIn=True, and than go this page. The flow is stopped.
So I am hard to determine which part is the problem.
On Mon, Feb 7, 2022 at 11:16 PM Louis MILCENT @.***> wrote:
As you can see here, the plugin does not block the manifest file. For me this should not cause any trouble. Does it work correctly without the plugin?
— Reply to this email directly, view it on GitHub https://github.com/LM1LC3N7/nodebb-plugin-private-forum/issues/5#issuecomment-1031579349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4Y6UH6NKSGMMBCXKEBDP3UZ7O5ZANCNFSM5NMCCKKQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>
Hello, can you try again with the latest version 1.3.0?
thank you very much. It works.
I check your code changing, but I did not understand. It seems you change the solution, previous solution is based on the app init, and then based on the route request. It seems based on the route request is "easy" to understand, but on the route is a little difficult to know the behavior.
The new version is very succesful. In the previous solution, though chrome F12 , there is always lots of error, but now all the error request is gone. It likes magic.
I am new to nodebb, I have not understand the plugin design in nodebb. Your plugin is a good start.
Great to read the problem is solved. I have found a small part of the solution on the forum, the other one on an existing plugin (and documentation) 😇
I am a beginner too in NodeBB, so feel free to copy the code and study it, if it can help 😊
I install the plugin it works. but
when i login in , the url redir to xxxx/manifest.webmanifest?loggedin=true. The browser show the json content.
I am using nginx as reverse proxy, is there special config required?
Before I using the plugin , everything is ok.