Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send device information to notification service #153

Closed
rmeissner opened this issue Apr 8, 2019 · 3 comments
Closed

Send device information to notification service #153

rmeissner opened this issue Apr 8, 2019 · 3 comments
Labels

Comments

@rmeissner
Copy link
Member

rmeissner commented Apr 8, 2019

Story

As a developer of the notification service, I would like to have more information of the devices registered in the service.

Background

Currently just the firebase token and the ethereum address is stored for every device
It would be very useful for new functionalities to store information about the device (operating system, version, client), so we can use different logic for every device depending on iOS, Android, Web...

Acceptance criteria

Device information should be gathered and stored when a device is registered in the service.

The following information are required by the new endpoint:

  • Array of signatures (r, s, v) that where generated by the accounts that should be registered
  • Firebase push token
  • Build number (e.g. 1644)
  • Version name (e.g. 1.0.0)
  • Client (e.g. android, ios or extension)
  • Bundle identifier (e.g. io.gnosis.safe or pm.gnosis.heimdall)

Technical Details

The new endpoint should be reachable via /v2/auth/

To register a new device a POST request needs to be performed.

The payload should be in the following format:

{
  "push_token": "<string>",
  "build_number": "<integer>",
  "version_name": "<string>",
  "client": "[android | ios | extension]",
  "bundle": "<string>",
  "signatures": [
    {
      "v": "<integer>",
      "r": "<stringified int>", 
      "s": "<stringified int>"
    },
  ]
}

None of the devices will be update/created if invalid information is provided for one of them.

Each signature is generated by signing the following data:
sha3("GNO" + <pushToken> + <build_number> + <version_name> + <client> + <bundle>)

Response would be a list with one element for every owner that signed the tx:

[
{
  "owner": "<checksumed string>", 
  "client": "<string>", 
  "created": "2019-04-23T09:33:55.555388Z",
  "modified": "2019-04-23T09:33:55.607356Z",
  "pushToken": "<string>",
  "buildNumber": "<int>",
  "versionName": "<string>",
  "bundle": "pm.gnosis.heimdall"
}, 
...
]
@rmeissner rmeissner added the Epic label Apr 8, 2019
@DmitryBespalov
Copy link
Contributor

looks good to me

@Uxio0
Copy link
Member

Uxio0 commented Apr 8, 2019

Agree

@Uxio0
Copy link
Member

Uxio0 commented Apr 23, 2019

@DmitryBespalov @rmeissner @sche I have updated the epic with the response of the endpoint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants