How can I get the current user role in my web app?
I have just used views to get this working.

Duplicate the default people view and rename it current_user.
Add a rest export route eg. rest/users/current_user.
Add a filter for current user. (User: Current = yes)
Save all.
Retrieve the current user via http get request on example.com/rest/user/current_user?_format=hal_json

Thanks to QueenVictoria for the advice.