Skip to content

Meeting 2017 08 17 Backend

Kai Xu edited this page Sep 8, 2017 · 1 revision

Participants

Present: Reday, Shaz, Kai

Agenda (to discuss)

Reday: progress update on login. More discussions in issue #85 https://github.com/Vis4Sense/SenseMapExtension/issues/85

Shaz: progress update on REST API

  • Local version of the API
  • Hosted MongoDB on mlab
  • Hosted Node.js on HEROKU

Discussion Points

User identification:

  • Use email address as the ID on the client side
  • Use the email address or the '_id' generated by MongoDB on the server side

REST API authentication: only the authorised user/client can access the REST API

  • Use the mongo '_id' as the secret key (current choice).
  • Or generate once-off secret key for each user session (maybe later).
  • What about the first time before a user is added to the database?

Action Points

Login

  • Integrate with SenseMap: trigger login once user presses the SenseMap icon in Chrome.
  • Test
    • Try to 'simulate', i.e. send the login object returned from Google using Sinon, first.
    • Async testing in Sinon (maybe later)
  • Send the user information object to the database through the REST api.

REST api

  • Use the schema of user information object from the Google OAuth to store in MongoDB (store everything).
  • For the login component to communicate with MongoDB through the REST API
    • Send user information to MongoDB
    • Check if user exist by email address (use 'email address' as user id); use the '_id' internally in MongoDB only.
  • A way to authenticate the user when communicating with the MongoDB
    • For example, generating once-off secret key for each user session.
    • Or use the mongo id '_id' as the secret key.
    • What about the first time before a user is added to the database?
  • A document or video of the REST API work so far.
  • Move the Heruko nodejs code to SenseMap repository (currently in Shaz's repository)
Clone this wiki locally