Set admin based on jwt token #45

Closed
opened 2020-01-10 22:19:27 +00:00 by KevinMidboe · 0 comments
KevinMidboe commented 2020-01-10 22:19:27 +00:00 (Migrated from github.com)

Admin is checked in localstorage to know if the user can search for torrents or not. This currently does not work because /login looks for a admin property in the response, but the admin property is sent via the JWT token.

Change login function to decode (base64) JWT token and look for the admin and username property there.

Admin is checked in localstorage to know if the user can search for torrents or not. This currently does not work because /login looks for a admin property in the response, but the admin property is sent via the JWT token. Change login function to decode (base64) JWT token and look for the admin and username property there.
Sign in to join this conversation.
No description provided.