LogoLogo
  • Welcome
  • Getting Started
  • Integration Methods
  • SDKs
  • Tebex for Unreal Engine 5
  • Tebex for Unity Engine
  • Webstore Builder
    • Overview
    • Getting Started
    • Twig
      • Tags
      • Filters
      • Functions
    • Global Variables
      • basket
      • store
      • page
    • Pages
      • index.html
      • checkout.html
      • username.html
      • options.html
      • package.html
      • cms/page.html
      • category.html
      • layout.html
    • Sidebar Modules
      • module.communitygoal.html
      • module.featuredpackage.html
      • module.giftcardbalance.html
      • module.goal.html
      • module.payments.html
      • module.serverstatus.html
      • module.textbox.html
      • module.topdonator.html
    • Assets
    • Schema
    • Developer Plan
    • Footer
    • Guides
      • Package Slugs
  • Headless API
    • Overview
    • Getting Your Listings
    • Creating a Basket
    • Adding Packages
    • Gifting Packages
    • Applying Discounts / Creator Codes
    • Directing to Checkout
    • Endpoints
    • Postman Config
    • Example Integration
  • Checkout API
    • Overview
    • Headers and Authentication
    • Start the Checkout Process
    • Checkout Webhooks
    • Endpoints
    • Errors
    • Postman Config
  • Tebex.js
    • Overview
    • Integration
    • Events
    • Web Components
    • Custom Render Location
    • NPM
    • GitHub
  • Webhooks
    • Overview
    • Login Webhooks
  • Game Server API
    • Overview
    • Authentication
    • Error Handling
    • Endpoints
  • Affiliate API
    • Overview
    • Referrals
    • Game Types
    • Webhooks
Powered by GitBook
On this page
  • Root Object
  • External Login
  • Non-External Login
  • Full Working Example
  • Request Variable

Was this helpful?

Export as PDF
  1. Webstore Builder
  2. Pages

username.html

The username.html page is responsible for allowing your customers login to your store.

Root Object

Variables
Type
Description

external

Boolean

provider

String

The name of the login provider, such as FiveM, Discord or Steam.

url

String

The URL that the customer should be directed to so they can perform their login with the external provider.

External Login

If the external variable is true, let the user click a link to proceed to login via the external login provider:

<p>Please login with your {{ provider }} account to continue.</p>
<a href="{{ url }}">Login</a>

Non-External Login

If the external variable is false, provide a form submitting to the current url, including an ign form parameter. The ign parameter should be a text field allowing the customer to enter their username freehand.

An example can be seen below:

<form method="post">
    <input type="text" name="ign" placeholder="Enter your in-game username" />
    <button type="submit">Login</button>
</form>

Full Working Example

An example of a flow supporting both external and non-external login providers is shown below:

{% if external %}
    <a href="{{ url }}">Login via {{ provider }}</a>
{% else %}
    <form method="post">
        <input
            type="text"
            name="ign"
            placeholder="Enter your in-game username"
        />
        <button type="submit">Login</button>
    </form>
{% endif %}

Request Variable

Previouscheckout.htmlNextoptions.html

Last updated 7 months ago

Was this helpful?

If the login provider of the store requires the user to be sent to an external url which is available in the url variable. See for what to do in the event external is false.

If you'd like access to a variable that is not currently available,

please let us know.
Non-External Login