parse-community / parse-community/parse-server

feature request: improved error reporting when 'invalid session token' logged

Open
#4,330 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
JavaScript
Stars
21.4k
Forks
4.8k
Avg merge
7h 45m
Merged PRs (30d)
11

Description

Issue Description

I'm receiving many 'invalid session token' error messages in the log, it's in fact around half of my requests now and although I caught several obscure ones from very old client SDK versions that I can't update and that are trying over and over, I'm also receiving many new with r:XXX format. Some of these are legitimate 'first try' from a device after the user password was reset, but I'm afraid there are other cases that I don't know about and would like to catch.

So I'd love to see some additional info getting logged around when a 'invalid session token' is detected.

Additionally it would be great if we can disable logging of 'invalid session token' in certain cases, for certain request paths, or certain users? to lower the noise in the logs.

Expected Results

Receive as much information as possible in a log when 'invalid session token' is logged. Such as request path, client sdk version, user email, other? that will help in debugging who and why.

Actual Outcome

For the moment only 'invalid session token' is logged making it hard to spot problematic behavior.

Environment Setup
  • Server
    • parse-server version (Be specific! Don't say 'latest'.) : 2.6.5
    • Operating System: Ubuntu 14.04 @ Digital Ocean

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the server for the exact “invalid session token” log message and trace the session-token handling entry point. Review how request paths and user or client metadata are available there, then determine the scope of configurable logging suppression. Done means the requested diagnostic context and supported suppression behavior are clearly defined and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript, node.js
Domain
api, backend, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.