Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Authentication

Omri Bornstein edited this page Dec 13, 2020 · 4 revisions
  • Social network username (String object)
  • password hash
  • Sign-in date (Date object)
  • Social network type ("instagram", "tiktok" or "vsco")
  • Boolean for Instagram authentication
  • Document ID (key of _id)

Server API

  1. Accepts HTTP JSON body of {username: String, password: String},
  2. hashes password
  3. and saves user record without signing-in.
  1. Accepts HTTP JSON body of {username: String, password: String},
  2. compares password hash,
  3. signs-in to Instagram through Puppeteer.
    • If sign-in ended successfully, an HTTP JSON response of {toke: String} is returned with JSON Web Token (JWT).
  1. Accepts HTTP header with JWT in the Authorisation field,
  2. signs-out to Instagram through Puppeteer.
    • If sign-out ended successfully, an HTTP JSON response of {status: false} is returned.