authcha learn

Learn / Guest and portals

Guest vouchers

Module 1 of 5 · 30 minutes

By the end you can

  • Describe the four steps from issuing a voucher to a device being admitted
  • Prepare the network so a guest device lands in the right place
  • Issue, approve, renew and revoke a voucher, and explain each status
  • Explain why a failed redemption always looks the same

The idea

Visitors need network access for a few hours or days, without a shared Wi-Fi password that everyone eventually knows. Authcha uses vouchers:

  1. A sponsor (say, front-desk staff) issues a code.
  2. An administrator approves it.
  3. The guest redeems the code on a public web page.
  4. The guest's device is admitted automatically.

You need the Guest Access module in your license edition, and Network Access Control for the underlying MAC admission.

 sponsor            administrator         guest                    network
 issue voucher ──▶  approve voucher ──▶   open /redeem, enter
 (pending)          (approved)            code + device MAC
                                          (active, MAC bound) ──▶  device re-authenticates
                                                                   via MAB and gets the
                                                                   voucher's device class

When a guest redeems, their device's MAC is added to the MAC allowlist with the voucher's device class (default guest), and from then on the device is admitted through the normal MAB path you met in the Network track. When the voucher expires or is revoked, the entry is disabled and the device is refused at its next authentication.

Roles

RoleCan do
SponsorIssue vouchers and see their own. Sees only the Dashboard, Vouchers and their Profile
AdminEverything a sponsor can, plus approve, revoke and renew any voucher and see every voucher
ViewerNo access to vouchers. A voucher code is a usable credential, so the read-only role never sees it

Create sponsor accounts under Administrators → Accounts → Add admin with the sponsor role.

Prepare the network

  1. The guest class. Under Device Classes, give guest the VLAN, QoS, session limit and bandwidth guests should get. Add vendor attributes if your controller needs them.
  2. Guest access points or switches. Register them under Devices, add them as RADIUS clients and turn MAB on.
  3. Pre-authentication access. Configure the guest SSID or port so a device not yet on the allowlist lands in a restricted state where it reaches only DHCP, DNS and Authcha's HTTPS address (a walled garden or pre-auth ACL). Then redirect its web traffic to the redemption page. The feature name depends on your vendor: external captive portal, web redirect or MAB-failure fallback.
  4. Email (optional). Configure Integrations → Email (SMTP) so approved vouchers can be emailed to the guest.

The redemption page

Guests open https://<authcha-host>/redeem. It needs no login and asks for the voucher code and the device MAC address. Your captive portal can fill both in with URL parameters, for example /redeem?mac=aa:bb:cc:dd:ee:ff&code=GY7OEVOUG6BH. After success the device must authenticate again to get guest access, so the guest reconnects or the controller re-runs MAB.

Why every failure looks the same

For security, a failed attempt gives the same answer whatever the reason (unknown code, expired, already used, revoked, bad MAC), so the page cannot be used to guess codes. Each failure also takes a random 100 to 300 milliseconds so timing does not leak anything, and attempts are limited to 10 per minute per address. The guest sees a generic message and a random support code. If a guest needs help, they quote that code to you, and you find the real reason (bad_code, expired, revoked, exhausted and so on) under Vouchers → Analytics → Redemption attempts.

Issue, approve, renew, revoke

Go to Vouchers → Issue voucher.

FieldMeaning
Issued toGuest name or reference
EmailOptional. The code is emailed when the voucher is approved
Valid untilExpiry time, at most 180 days ahead
Max redemptionsHow many different devices can use the code. Default 1
Device classPolicy for the guest's devices. Default guest
Allowed subnetsOptional. Limit the voucher to devices on segments you name
StatusMeaning
PendingIssued, waiting for approval. Cannot be redeemed
ApprovedReady to redeem
ActiveRedeemed; one or more devices bound
ExpiredPast its end time; its devices are no longer admitted
RevokedCancelled by an admin; its devices are refused immediately

Administrators can renew (extend, up to 180 days from now), and sponsors and administrators can resend the email. Revoking always works, whatever your license status.

Expiry is enforced twice

A background sweep every 20 seconds marks expired vouchers, disables their allowlist entries and ends their live sessions. Independently, every MAC authentication checks the voucher's end time, so a stopped sweep can never extend access. When a voucher ends, Authcha sends a Disconnect-Request for the device's open sessions. Devices that support CoA end the session at once. Ones that do not, such as pfSense, have it queued for the portal agent.

Limit a voucher to certain segments

With allowed subnets, a device using the voucher is admitted only through network devices assigned one of those subnets. A network device with no subnet assigned fails closed: guests using a scoped voucher on it are refused.

LabHands-on

  1. Open Vouchers on the demo as demo-admin (password Authcha-Demo-2026). Look at vouchers in different statuses.
  2. Open Analytics and read the redemption rate and the failure reasons.
  3. Issue a voucher for "Test visitor" valid for one day. Note it is pending.
  4. Approve it. Note the status change.
  5. Open /redeem on the demo host and try your code with a made-up MAC address. Then try a wrong code. Compare what you see.
  6. Revoke the voucher and watch its status.
  7. On your own install, do the same, then check Access Control → Disconnect log after revoking a voucher with an active guest.

Check yourselfQuiz

1A guest enters an expired code and a made-up code. What do they see?
2Where do you find the real reason a redemption failed?
3Which role never sees a voucher code?
4A voucher is limited to certain subnets and the switch has no subnet assigned. What happens?
5What happens to a guest's open session when a voucher is revoked?

Cheat sheetKeep this

  • Flow: sponsor issues, admin approves, guest redeems at /redeem, device admitted by MAB in the voucher's class (default guest).
  • Status: Pending, Approved, Active, Expired, Revoked. Max validity 180 days.
  • Needs: guest class with a VLAN, MAB on the guest devices, pre-auth walled garden to Authcha's HTTPS.
  • Redeem failures are all identical. Support code to Analytics → Redemption attempts.
  • Expiry enforced by a 20 s sweep and at every authentication.
  • Scoped vouchers fail closed on devices with no subnet.
  • Read more: Guest access.