Search⌘ K
AI Features

Show the User Profile

Explore how to access and display authenticated user profile information in a Blazor Server application using Auth0. Learn to retrieve and show user data such as username and picture by handling ID tokens securely after login. This lesson helps you understand integrating user profile display within a secured Blazor Server environment.

It’s quite common to show user profile data on the UI after they have authenticated. Let’s see how we can do this in our Blazor Server application.

Authentication and user profile

Before going into the code, let’s understand what happens when the user authenticates with Auth0.

After the authentication, Auth0 generates a token in JSON Web Token (JWT) format. This token, known as the ID token, contains some information about the authentication operation and some data about the user, such as their name ...