Skip to content

MILESTONE - Authentication #7

@jeturcotte

Description

@jeturcotte

With users being saved to the database, ought be not allow them to log in?

  • First, learning hashing ... we MAY throw it out afterward for Oauth but there is value in going through it
  • Second, provide a login form / welcome page
    • Build out a session/cookie detection clause
      • If cookie/session is found, say 'welcome $username'
      • If not, provide a login form
        • Ask for Username and Password
  • Third, provide an authentication endpoint
    • Accept Username and Password
      • Encrypt the password given
      • So a lookup against the table for a user that has the username and encrypted password
      • Create a session and/or cookie if there's a result
      • Return a 'failure to log in' if not (and don't tell them that the username doesn't match; this protects the site from being scanned for usernames)
  • BONUS; Add a field or new table that shows the last datetime any given username logged in
    • Could be done a few ways; not required at this time, up to you
  • BONUS/LATER; At the same time, investigate Oauth2 as an option
  • First, provide an 'authentication' endpoint
    • Make sure it accepts a username and accepts a password
  • TASK: provide a link/api-endpoint that logs a person out

Metadata

Metadata

Labels

AuthenticationAny task tagged with this will add or modify authentication practicesUser AccountAny task tagged with this will add or modify user account functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions