FROS - Authorization and Authentication
Closed this issue · 1 comments
Feature Description
#13 requres some backing on an authorization/authentication structure. Referring to Discord, it uses JWT based auth, where the first block of the token (before the first period) is the user's user id, encoded to b64.
Use Case
We should build a system we can trust to ensure api calls are both authorized and authenticated, additionally some of our api methods will require the user reference to manage operations like server creation (so the user can be marked as the owner) etc.
Prerequisites
N/A
Any additional remarks:
N/A
Amending onto this, we should look into implementing Row Level Security (RLS) for most if not all of these rules as sorting them out on the database side would prove much cleaner in our nextJS code, likewise this would be more efficient as no additional communication needs to occur between our database and endpoint prior to executing the endpoint's operation.