GitXplorerGitXplorer
o

auth-all

public
1 stars
1 forks
6 issues

Commits

List of commits on branch master.
Verified
bbb0d6cb51fe584d4f28326aec0b9aa11a5dd9e0

mailgun module + mail endpoint (login, newAcct) (#20)

oongspxm committed 6 years ago
Verified
f91a773e4c749c8cfd1467f2368f4312777a0d7c

adding actual UI for login page (#17)

oongspxm committed 6 years ago
Unverified
472e4ee9feea4911ac4d1f7377d7f860379c78f9

feat. lib module for mail users

oongspxm committed 6 years ago
Unverified
1ca910eae0f44ed6c18c0ee73d742c732cef88f4

removed mail/api

oongspxm committed 6 years ago
Unverified
872d9bc5bc84fe5f33fcab41ea98bac1970ac6f1

wip: done up with mail_users and its test

oongspxm committed 7 years ago
Unverified
558679bbd8c7813dbe63b507030e114f21937c14

wip: mail_users test, only getUser done

oongspxm committed 7 years ago

README

The README file for this repository.

auth-all

basic login details

  • clientId obtainable from /app
  • callback must start with https

logging in user with facebook

  • GET /login?clientId=&callback= to show simple form
  • call /fb?clientId=&callback= to get redirected
  • will return to ${callback_url}#/access_tkn=jwtToken

logging in user with email

logging in

  • GET /login?clientId=&callback= to show simple form
  • POST /mail?clientId=&callback=&email=&pass=
  • will return to ${callback_url}#/access_tkn=jwtToken

creating new acct

  • GET /login?clientId=&callback= to show simple form
  • POST /mail?clientId=&callback=&email=&newacct= => ok
  • email sent for password setup

resetting password

  • GET /login?clientId=&callback= to show simple form
  • POST /mail?email=&reset=reset => "check email notification"
  • GET /login?reset=xxx to show simple form
  • POST /mail?email=&pass=&reset=xxx => "password changed"

admin features

  • header: Authorization: Bearer <jwt token>
  • /signin: redirected to the app page after signin
  • /getSites: return list of sites
  • /addSite?domain=: add domain to our account
  • /delSite?site=secret=: delete a particular site
  • /genSecret?site=secret=: generate a new secret

jwt tokens

{
    iss: "dateideassg.com",
    sub: "fb_123456",
    iat: 12341211,
    exp: 12341234
}

sites

{
    id: "clientId",
    secret: "clientSecret",
    domain: "activeDomain",
    acct_id: tied_to_which_acc
}

setting up

fill in the process.env values in .sample.env