aoauth is a service that allows you to register a list of your characters in Anarchy Online, validate them with an in-game bot and later sign in to websites as one of these characters using JWT (JSON Web Tokens).
You can pretty much think of this as a "Login with Google" option, but it uses Anarchy Online instead.
You can find the source code for aoauth and a detailed explanation here!
Here's a quick TLDR for clients: Redirect your users to https://aoauth.org/auth?redirect_uri=http://my-server/callback&application_name=My+website. They will then be prompted to log in, if they haven't already, and then select a character to authenticate with. After that, they are redirected to your specified "redirect_uri" with a "_aoauth_token" query string parameter that is a signed JWT token containing the character and expiry for this token. It is signed with ECDSA using SHA-256 and our public key:
-----BEGIN PUBLIC KEY----- MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEO3LC4ykl2mx/kjJp4wsA2Zy8Yyod w8BY7vWCjFsgPHWNexCmVxwohaKX1bEV0k7ixwqAgbKh2NqCOut45tFEIg== -----END PUBLIC KEY-----
Make sure to validate it!