This repository has been archived by the owner on Jul 9, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
)
- 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).
- If sign-in ended successfully, an HTTP JSON response of
- 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.
- If sign-out ended successfully, an HTTP JSON response of