• Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Default
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Quartz
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Slate
  • Solar
  • Superhero
  • Vapor
Collapse

Community

Irfan BabarI

Irfan Babar

@Irfan Babar
About
Posts
13
Topics
5
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    Any Global config/environment variables
  • Irfan BabarI Irfan Babar

    Hi, I m working on the global config vars. I couldn't find a way to set global value so I can use it in the template or custom theme templates. The only easy way to put something for templates is actually locale. but the problem is I have put the same value in all locale in order to work properly, otherwise, if someone uses a language in which I didn't set the locale, they won't see my required values.

    Any easy way to put a config value in a file, and can use them on each template or even in the controller if possible. (template is priority)


  • RE: How do I create a settings page for my plugin?
  • Irfan BabarI Irfan Babar

    thank you for this.


  • RE: Guideline for custom plugin setting page creation
  • Irfan BabarI Irfan Babar

    @julian I know you guys must be busy. I m on tight deadlines that's why I was looking for some docs, which at least give us some guidance, and some basic key points to start creating a plugin.

    Btw I used your session-sharing plugin to understand most of the key points 🙂


  • RE: Guideline for custom plugin setting page creation
  • Irfan BabarI Irfan Babar

    So I need to look into codebase? I thought we may have some kind of docs. Nevermind, I m already following same approach


  • Guideline for custom plugin setting page creation
  • Irfan BabarI Irfan Babar

    Hi, I have created a custom private plugin for nodebb platform for a client. It is like the session-sharing plugin, handling sso with jwt but with a custom implementation. I need to create a setting page inside ACP for my plugin as session-sharing has. so I can put some dynamic values for cookies i.e; domains, token names, etc.

    Is there any doc for creating a setting page or something similar? I cannot find anything useful in nodebb docs relevant to it.

    thanks


  • RE: Hook suggestion
  • Irfan BabarI Irfan Babar

    @julian no I m not using session sharing because I need to use client specific endpoints, so if you can tell me which hook is best for check token authorization, it will be helpful


  • Hook suggestion
  • Irfan BabarI Irfan Babar

    Hi, I m writing my own plugin for auth, it will check if the token exists and it is valid (with custom APIs) then proceed, if not then logout.

    I looked into website found that this hook can help me "response:middleware.authenticate"

    I have integrated it and tested it locally, but sometimes it doesn't execute at all. I don't know the reason. So I m a little concern that may be I cannot rely on it. if there any other hook which can be use for auth check please let me know

    Thanks


  • Can't login with normal user
  • Irfan BabarI Irfan Babar

    Hi, I have set up the master branch of nodebb with nodebb-plugin-session-sharing plugin installed for sso. I can easily log in with the admin user which I created during setup. but when I use the registration form of nodebb create a user, then try to log in with it. It doesn't work. Actually, it shows login successfully but I can still see the login and registration buttons and can't create any posts.

    Screenshot 2023-01-24 at 6.21.40 PM.png

    Thanks


  • RE: Integrate JWT authentication & Authorization
  • Irfan BabarI Irfan Babar

    got it, I will try this. thanks


  • RE: Integrate JWT authentication & Authorization
  • Irfan BabarI Irfan Babar

    @julian You were right, it was not related to nodeBB. I have integrated this plugin with nodeBB "master" (which I don't prefer by the way) and now it works.

    Issues

    1. One issue, I m getting is that, in the plugin, it is mentioned that if you have a subdomain for the forum and you need to share a cookie from the main domain to the subdomain, you have to set domain property of cookie to your main domain i.e; "example.com".
      but when I set the domain property in the session sharing's setting to "example.com" and put a valid cookie with the main domain for forum.example.com. it doesn't login to my user, but if I change it to forum.example.com it works.

    2. Once loggedin, if I remove token, it wont log out, and if I click logout instead, it wont remove token.
      In both ways, I cant log out once login.


  • RE: Integrate JWT authentication & Authorization
  • Irfan BabarI Irfan Babar

    @julian thanks for the quick reply. Yes, I have found this package and understand now, how it works, but one problem, it works only for the master branch code, in the 2.x branch, we cant save plugin session information.
    so I clone the master branch code and deployed it. But master branch code has an issue while running "./nodebb build" cmd.
    issue: "Module not found: Error: Can't resolve 'persona/quickreply' in <your-system-path/build/public>"

    Can you help me resolve this issue or is there any way, i can use this plugin using 2.x branch?


  • Integrate JWT authentication & Authorization
  • Irfan BabarI Irfan Babar

    Hi everyone, hope you are doing great. I m working with a client and he has a website having custom implementation of JWT authentication and authorization. He wants me to integrate nodeBB with a website containing the SSO feature. I tried plugins but none is helpful. so I finally decided to change nodeBB auth mechanism with my custom logic in order to make SSO feature successful.

    But right now I can see there are a lot of things depending upon sessions and I couldn't able to integrate JWT successfully.
    So can anyone, suggest to me how I can integrate JWT without making a lot of existing changes (if I do, it will break many things)?

    thanks in advance

  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
  • Login

  • Don't have an account? Register

  • Login or register to search.