Programmatically implement the credentials flow from Token Slinger!
- Create a user on the database.
- Upon success, begin token grant. Upon failure, display message.
- Request a token by sending credentials (email and password). Upon success, store the token to local storage and begin authenticated request. Upon failure, display message.
- Create an authenticated request: (
GET /me
). Sign it with the token. Upon success, display user info. Upon failure, display message.