Authentication - AppleGamer22/scr-web GitHub Wiki
- 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
- Accepts HTTP JSON body of
{username: String, password: String},
- hashes password
- and saves user record without signing-in.
- Accepts HTTP JSON body of
{username: String, password: String},
- compares password hash,
- 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).
- Accepts HTTP header with JWT in the Authorisation field,
- signs-out to Instagram through Puppeteer.
- If sign-out ended successfully, an HTTP JSON response of
{status: false} is returned.