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

  • Default (No Skin)
  • No Skin
Collapse
v3.5.1 Latest
Buy Hosting

Is it possible to use my application user name and id instead of creating new account in nodebb with random uid?

Scheduled Pinned Locked Moved Feature Requests
6 Posts 3 Posters 502 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • venkATV Offline
    venkATV Offline
    venkAT
    wrote on last edited by
    #1

    @julian I am trying to use my own application user details (username and userID)

    Example:

    {
       username: 'venkat',
       userId : "2a5t8862-88k52-48569df5"
    }
    

    can I use above user details for nodebb.

    As of now nodebb is creating incremental id (uid)
    instead of that uid, can i use my own userId as nodebb
    uid

    Present Nodebb user details:

    {
       username: "venkat",
       uid: 5
    }
    

    my requirement is

    {
      username: 'venkat',
      uid: '2a5t8862-88k52-48569df5'
    }
    

    is there any way to implement the above requirement ?

    CC: @vinu

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to venkAT on last edited by
    #2

    @venkat you want to store a map in the database, mapping NodeBB uids to your userId format.

    1 Reply Last reply
    0
  • macfanM Offline
    macfanM Offline
    cronlabspl
    wrote on last edited by
    #3

    Same situation here.
    We have all our internal services (Marketing, Accounts, Shells, Mail, Forum etc) where users use same useraccount for loging-in.

    Every service works except forum. Ive done as @PitaJ suggested above but no luck.

    Anyone ?

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #4

    What did you try? Have you seen the session sharing plugin?

    venkATV 1 Reply Last reply
    0
  • venkATV Offline
    venkATV Offline
    venkAT
    replied to PitaJ on last edited by
    #5

    @pitaj Is it possible to add nodebb uid as a string

    I did some code change in Nodebb repo for adding string as a uid, it is storing but while accessing I am not getting the proper data.

    can you suggest me the better solution?

    I need to use my identifier(string) as a nodebb uid instead of auto increment uid(number) ?

    PitaJP 1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    replied to venkAT on last edited by PitaJ
    #6

    @venkat have you looked at the session sharing plugin?

    GitHub - julianlam/nodebb-plugin-session-sharing: Allows login sessions from your app to persist in NodeBB

    Allows login sessions from your app to persist in NodeBB - GitHub - julianlam/nodebb-plugin-session-sharing: Allows login sessions from your app to persist in NodeBB

    favicon

    GitHub (github.com)

    It provide functions for retrieving the NodeBB id from your id.

    Using that plugin is the recommended way of sharing sessions between applications.

    Changing the NodeBB id format is a futile effort. You can't just change it to a string. The closest you can do is map your id to the NodeBB id.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

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