Browser Extension Authentication
Before we get started, it's important to understand what a tracking code(TC) is and why it is used.
When a user installs your extension, we need a way to identify the user to affiliate when they activate cash back through your extension, in order to attribute them properly when the sale completes its lifecycle. This is done at Wildfire by attaching a TC query parameter at the end of your affiliate url. Once the sale completes its lifecycle, you can retrieve the value within the TC parameter. By going in to the admin tool, and posting the data to your callback URL.
Example of a vanity URL with a TC parameter:
Example of an offline vanity URL with a TC parameter:
Many extensions use different models, whether it's an OAuth flow, or logging in directly through the extension. They all serve the purpose of having the user identify themselves, and saving that identifier in the extension's storage. For this method we will leverage your existing authentication system. The extension will send the user to the partner's login page with a URI included as a query parameter.
Example of login URL
After the user is successfully authenticated the partner will redirect to the provided URI and include the user's UUID as a query parameter.
Example of redirect URL
At this step the extension will store the UUID and include it as the tracking code on all affiliate link activations.
When passing a UUID ensure that each UUID is unique to a single user, does not change, and is a valid UUID. Each individual user should only have one UUID.