Getting users from auth with unique ID
Our authentication server now supports login and get users using email. For our scoped authentication sessions to work, we must create an API where we can get the user details from the unique ID because we have the unique ID from the JWT in the authentication session.
At this point in the book, we have added an number of API endpoints to servers, so like the others, we are going to start with the data access layer. At this point you should be familiar with adding API endpoints so feel free to tackle this yourself. The following subsections of adding this endpoint will be brief.