broology / poker-moons

Free online poker with friends without the hassle.
4 stars 3 forks source link

feat: implement basic authorization system #216

Closed jordems closed 2 years ago

jordems commented 2 years ago

Proposed Changes

Introduces a very simple authentication system that in summary: Generates a unique token for the player when they join the table. Then the client stores that token in the browsers localStorage. Then when sending requests to the server relative to this table, it will pull the token and add it to the Authorization Header. And all player related endpoints besides /join will confirm that the token matches the player that is being requested on.

Linked Issue

resolves #215

Types of changes

Merge Checklist

Deployment Notes