Skip to content

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

Open
Opened 23 hours ago by Ben Hayward@benhayward.ben
Report abuse

Surge token deletion on logout #1270

  • Overview 3
  • Commits 1
  • Pipelines 1
  • Changes 5
0/1 thread resolved

Summary

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

To hammer out with @brianhatchet and @msantang78. This is going to likely be tricky to test as we do not digest push notifications on the front-end, just the mobile app. This may require us using a manual build of the app and plugging it into the associated sandbox.

I would recommend testing sessions and account swapping/triggering notifications.

Regression Scope

Changes v Impact

  • api/v1/notifications - Simple change, setting the token on notif POST (from mobile).
  • 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.
Request to merge fix/logout-surge-token-deletion-1270 into master
Open in Web IDE
Pipeline #107889461 passed for 8954440c on fix/logout-surge-token-deletion-1270
          Requires 3 more approvals from Devs, Deployers, and QA.
          Rami Albatal
          Rami Albatal
          Marcelo Rivera
          Marcelo Rivera
          Guy Thouret
          Guy Thouret
          Mark Harding
          Mark Harding
          Emiliano Balbuena
          Emiliano Balbuena
          Ready to be merged automatically. Ask someone with write access to this repository to merge this request

          Deletes source branch

          • Ben Hayward @benhayward.ben added Squad::Yellow Status::Blocked scoped labels 23 hours ago

            added scoped labels

          • Ben Hayward
            Ben Hayward @benhayward.ben · 23 hours ago
            Developer

            Set to blocked pending chat with Brian and Martin.

          • Ben Hayward @benhayward.ben assigned to @brianhatchet, @msantang78, and @benhayward.ben 23 hours ago

            assigned to @brianhatchet, @msantang78, and @benhayward.ben

          • Brian Hatchet
            Brian Hatchet :speech_balloon: @brianhatchet · 23 hours ago
            Developer

            Testing on the app requires two things that we don't have.

            1. An ability to change the base url in the app for testing purposes.
            2. The ability to push notifications from the review sites.

            So, let's add some logging to show the push notifications going out so we can verify the body of the notification. Once we're sure the logging works, we'll verify it on staging

          • Brian Hatchet :speech_balloon: @brianhatchet added Status::BuddyReview scoped label and automatically removed Status::Blocked label 23 hours ago

            added scoped label and automatically removed label

          • Ben Hayward
            Ben Hayward @benhayward.ben started a thread on the diff 1 hour ago
            Controllers/api/v1/notifications.php
            146 146 'service' => $service,
            147 147 'token' => $passed_token
            148 148 ]);
            149
            150 Core\Session::getLoggedInUser()
            151 ->setSurgeToken($token)
            152 ->save();
            • Ben Hayward
              Ben Hayward @benhayward.ben · 1 hour ago
              Developer

              We need to dump notification JSON do it in notifications file, but behind developer mode or feature flag.

            • Please register or sign in to reply
          Please register or sign in to reply
          3 Assignees
          Brian Hatchet's avatar
          Martin Santangelo's avatar
          Ben Hayward's avatar
          None
          Milestone
          None
          Time tracking
          No estimate or time spent
          2
          Labels
          Squad::Yellow Status::BuddyReview
          Lock merge request
          Unlocked
          10
          10 participants
          user avatar
          Rami Albatal
          user avatar
          Marcelo Rivera
          user avatar
          Guy Thouret
          user avatar
          Mark Harding
          user avatar
          Emiliano Balbuena
          user avatar
          Martin Santangelo
          user avatar
          Olivia Madrid
          Reference: minds/engine!436

          Now you can access the merge request navigation tabs at the top, where they’re easier to find.

          More information and share feedback