Once a user has logged into your app, you can show their details - such as name, email, and username - on your website. This helps you provide a more custom experience for your users.

Show the user's name

You may use any element on the page to show the user's name. We suggest creating a <span></span> tag where ever you wish to show user data as it will prevent any style conflicts, however it is not necessary. To replace the text contents of an element on the page with the user's name, add the data-authpack attribute like so:

<span
  data-authpack="replace"
  data-value="user.name">
</span>

The above span tag will be populated with the user's name, should the user be logged in and have the filled in their name. Should you only want to show the user's first name, you can set the data-value attribute to user.name_given instead.

Show other properties

You may replace the contents of a element on the page with a number of different options including:

If you have enabled Authpack teams, then you will have access to: