All documentation

IRC SASL authentication

Use SASL to sign in to your IRC network as Mango connects. This guide covers a direct connection from Mango on Mac, iPhone, or iPad. SASL PLAIN uses your IRC account name and password. SASL EXTERNAL uses a TLS client certificate and requires Mango 3.1.6 or later.

Set up the network

  1. Choose Add Network, or open the network’s menu in the sidebar and choose Edit Network…. On Mac, right-click the network name. On iPhone and iPad, touch and hold it.
  2. For Libera.Chat, choose IRC server as the type and IRC as the connection type. Enter irc.libera.chat as the host and 6697 as the port. Turn TLS on and leave Allow invalid TLS certificate off. For another network, use its published TLS settings.
  3. Use an existing account on that IRC network. For Libera.Chat, follow the account registration guide if you need one.

SASL PLAIN

  1. Under Authentication, set Mechanism to SASL PLAIN.
  2. Enter your registered IRC account name in Account. On Libera.Chat this is your NickServ account name, which may differ from your current nickname.
  3. Enter the account password in New password and choose Save beside it. The optional server password is a separate field.
  4. Choose Done and reconnect. For a new network, choose Save and Connect.

Keep TLS enabled when using a password. It encrypts the connection carrying the SASL exchange. See Libera.Chat’s automatic login guide for network-specific help.

SASL EXTERNAL (CertFP)

Mango 3.1.6 or later supports EXTERNAL on direct IRC connections with verified TLS over TCP. Use IRC as the connection type. If a bouncer connects to the IRC network for you, configure its upstream authentication in the bouncer.

Prepare the certificate

Mango imports a password-protected PKCS #12 file (.p12 or .pfx) containing one client certificate and its private key. If you already have one, use it. For Libera.Chat, you can create a self-signed certificate and package it on a Mac with OpenSSL.

sh
umask 077
openssl req -x509 -newkey rsa:3072 -sha256 -days 365 \
  -subj '/CN=IRC client certificate' -keyout libera-key.pem -out libera-cert.pem
openssl pkcs12 -export -inkey libera-key.pem -in libera-cert.pem -out libera.p12

OpenSSL prompts for a private-key passphrase and an export password. Use the export password when importing libera.p12. Keep the private key and the .p12 file private.

Register the certificate on Libera.Chat

  1. Save the network with SASL PLAIN first, then reopen Edit Network…. Under Authentication → TLS client certificate, choose Choose certificate file… and select the .p12 or .pfx file. Enter its password and choose Import certificate. On iPhone and iPad, expand TLS client certificate to find the import controls.
  2. Confirm Mango shows a SHA-512 fingerprint, choose Done, and reconnect using your existing account password. Mango presents the certificate during this connection.
  3. In the server console or composer, run /msg NickServ CERT ADD while signed in to your Libera.Chat account. Wait for NickServ to confirm the fingerprint is registered. See Libera.Chat’s certificate guide for more on registration.
  4. Open Edit Network… again. Under Authentication, choose SASL EXTERNAL (CertFP), choose Done, and reconnect.

Import the certificate on every device that connects directly. If you change the host, port, or TLS server name, import it again for the new address.

Check the login

After reconnecting, check the server console for a successful SASL login. On Libera.Chat, /whois YourNick also shows which account you’re logged in to. If PLAIN fails, check the saved password and registered account name. If EXTERNAL fails, check that the connection uses verified TLS over TCP, the certificate is imported on this device, and its fingerprint is registered with the network.