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.
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.
You may replace the contents of a element on the page with a number of different options including:
user.name
: the user's full name.user.name_given
: the user's first name.user.name_family
: the user's family name.user.email
: the user's email address.user.username
: the user's username.user.stripe_plan
: the payment plan of the user.user.stripe_plan.id
: the payment plan's id.user.stripe_plan.name
: the plan's name.user.stripe_plan.description
: the plan's description.user.stripe_plan.amount
: the plan's amount in cents.user.stripe_plan.interval
: the plan's interval i.e. "week", "month", "year".user.stripe_plan.interval_count
: the number of intervals between each payment.If you have enabled Authpack teams, then you will have access to: