OAuth2 page authentication lets you restrict access to your event page by verifying ticket buyers through an external system, such as a membership database or internal directory. Only approved attendees can view or purchase tickets, and you can automatically pass their known information into the page to prefill fields or lock down fields you don't want them to edit, such as an internal ID or prior qualifications. Any data mapped to a field, hidden or visible, can also be used in actions just like any user-entered data.
In this article, you'll learn what's required to set up OAuth2 page authentication, how to turn it on for your page, and how to map your authentication data to your page fields.
Warning: OAuth2 page authentication is an advanced, custom integration intended for customers with the development resources and OAuth2 expertise needed to implement it.
RegFox does not provide support for setting up or troubleshooting custom OAuth2 integrations.
Jump To...
Requirements
Setting up OAuth2 page authentication requires development work on your end. Before you begin, make sure you have the following in place.
A general understanding of OAuth2 flows
The ability to build and host the endpoints that OAuth2 will connect to for your authentication system or data
Set Up OAuth2 Authentication
In TicketSpice, you can connect your OAuth2 provider to any TicketSpice page so you can verify a ticket buyer before they can access your page.
From the Pages screen, click the pencil icon on the page you want to edit
Hover over the Settings tab in the top menu bar
Select Restrict Access from the dropdown
Toggle Restrict Access to Your Page to Yes
Select OAuth2
Configure your OAuth2 endpoints and mappings
Map Attendee Data to Your Page (Optional)
If desired, you can use the OAuth2 feature to prefill or lock down page fields using data you already have about the ticket buyer, such as an internal ID or prior qualifications.
To pass data into your page, you'll set up a Data Endpoint that returns that data, then map its fields to the matching fields on your page.
Configure Your Data Endpoint
Your Data Endpoint can return any JSON structure you choose
The mapping connects each field in your payload to a field on your page
To map a field, you'll need that field's reference name, covered below
Find a Field's Reference Name
Each field on your TicketSpice page has a reference name you can use to map it to your data endpoint.
From the Pages screen, click the pencil icon on the page you want to edit
Scroll to the field you want to map
Click the pencil icon to edit the field
Click Advanced Options
Find and copy the Reference Key
Map Nested or Complex Fields
Some page fields, like Address, are made up of multiple sub-fields. To map data to these, reference each sub-field individually using dot notation:
{
"address": "address.street1",
"city": "address.city",
"state": "address.state",
"postal_code": "address.postalCode",
"country": "address.country"
}
Pro Tip: If you're not sure what sub-key to use for a field, right-click the field on your page and select Inspect in your browser's developer tools. Look for the field's ng-model attribute. The last segment of that value is the sub-key you'll reference. For example, an address field with an ng-model ending in street1 should be referenced as address.street1.


