• 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

C

chiguireitor

@chiguireitor
About
Posts
4
Topics
1
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

    RE: Authorizing another socket's session
  • C chiguireitor

    It seems require('socket.io').reqFromSocket(socket) doesn't returns a valid req for AuthController.doLogin.... i want to authenticate via websocket but maybe i will have to do it the old POST way, am i correct?


  • RE: Authorizing another socket's session
  • C chiguireitor

    Will check, thanks for the pointer


  • RE: Authorizing another socket's session
  • C chiguireitor

    Trustless login.

    Basically, using an app that sends a pubkey signed message to NodeBB out of band.


  • Authorizing another socket's session
  • C chiguireitor

    Hi all, i'm currently developing a plugin and i need to authorize another session from an express route i setup for a callback an externall app calls. From the call i'm getting i'm doing this:

    			let fakeReq = {
    				sessionID: sessionId,
    				ip: sock.remoteAddress,
    				useragent: useragent.parse(sock.request.headers['user-agent']),
    				session: {}
    			}
    			authenticationController.onSuccessfulLogin(fakeReq, data.uid, 
                                function (err) {
    				if (err) {
    					console.log('ERROR', err)
    				} else {
    					console.log('YAY')
    				}
    			    })
    

    Now, i'm getting the ["checkSession", 2] message on the remote websocket and a YAY on my dev console, but NodeBB goes nuclear into it giving a message about session not matching and reloading the page.

    What should i do to "fake" the login in this case?

    EDIT: The sock gets identified by the app callback and i extract it from the server eio client list.

  • 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.