How to prevent users with expired JWTs from receiving Firebase Cloud Messaging notifications after automatic logout?
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 15/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- firebase, javascript, node.js
- Domain
- authentication, backend
Research direction
No repository files or tests are named. Review the JWT expiration and jwt.verify flow described in the issue alongside the FCM notification flow; a complete outcome would need a defined way to prevent notifications after token expiry, but the issue does not specify a code change or integration point.
Written by the indexing model from the issue text.
Description
I have an issue where users whose JWT tokens have expired are still receiving FCM notifications after being automatically logged out.
The problem is the JWT expires and the user is logged out when they open the app and request the backend API which does jwt.verify. But FCM notifications can be sent without opening the app.
For example, if the JWT expires after 1 minute when the user logs in, and the user doesn't open the app again for 1 hour/1 day, their FCM token is still active because there was no logout action since they logged in.
So when a notification is sent, and the user opens it, they get redirected to the app and are automatically logged out. But they shouldn't have received the notification in the first place.
How can I prevent users with expired JWTs from receiving FCM notifications after automatic logout? Any suggestions would be appreciated!
- Dominant language
- JavaScript
- Stars
- 18.2k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/node-jsonwebtoken
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
auth0/node-jsonwebtoken#1042 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
auth0/node-jsonwebtoken#1000 · 2 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
auth0/node-jsonwebtoken#1046 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
auth0/node-jsonwebtoken#1034 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
auth0/node-jsonwebtoken#1032 ·
All issues in auth0/node-jsonwebtoken
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
neondatabase/website#5944 ·
-
module: core
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·