Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
  • Sign in / Register
Minds Backend - Engine
Minds Backend - Engine
  • Project overview
  • Repository
  • Issues 270
  • Merge Requests 34
  • CI / CD
  • Security & Compliance
  • Packages
  • Analytics
  • Wiki
  • Snippets
  • Members
  • Collapse sidebar
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Minds
  • Minds Backend - EngineMinds Backend - Engine
  • Merge Requests
  • !443

Open
Opened 3 weeks ago by Ben Hayward@benhayward.ben
Report abuse

Oauth endpoint surge token deletion #1270

  • Overview 3
  • Commits 5
  • Pipelines 5
  • Changes 3

Summary

Old mr !436 (closed) Closes #1270

Currently on the mobile app if you log into one account, then log out and into a different account, you will still receive push notifications for the first account.

This is because the Surge tokens (used for push notifications) that we use on the backend are not deleted on logout.

Steps

Video https://streamable.com/979cr

This is not the most straightforward feature to test, you will need to be set up on postman, and need to use kubectl exec -it to check Cassandra on the review site.

  1. Open up Postman.
  2. Set up a set of environmental variables that point to this sandbox. For more information see here: https://developers.minds.com/docs/walk-throughs/postman/
  3. Navigate to POST v2 oauth token
  4. Send the request - it will return your token.
  5. COPY the token to a text editor, keep it handy.
  6. On postman head over to POST api v1 notifications.
  7. In the params, replace the token with your token. Hit send.

This should set the Surge token in Cassandra, so lets check.

  1. Get your user GUID (loading your channel on sandbox, watch the XHRs, filter channel, and get your GUID from the response)
  2. kubectl into the container
  3. Open cassandra (kubectl exec -it cassandra-0 cqlsh)
  4. Run select * from minds.entities where key='1017892315210977294' AND column1='surge_token';, replacing my GUID with your own.
  5. There should be a value for the surge token.
  6. Now go to DELETE v2 oauth token, click the Auth tab, and replace the bearer token with your own from your text editor.
  7. Hit send, it should return a 200 with no body
  8. Re-run the cassandra command. Surge token should be gone.

Regression Scope

Changes v Impact

  • Session\Manager - limited to the destroy functionality, so would affect anything that destroys a session (e.g. logging out).
  • Entities\User - added functions and an exported value, I don't foresee any issues here.
Edited 1 week ago by Ben Hayward
Please register or sign in to reply
0 Assignees
None
Milestone
None
Time tracking
No estimate or time spent
2
Labels
Squad::Yellow Status::Ready to Merge
Lock merge request
Unlocked
participants
Reference: minds/engine!443