Probably it might be a good idea and a nice gift to the PostgreSQL community to move that one into a reasonably easy to maintain extension.
Auth code usually needs to be completely rewritten for 1.27+. If you want to take a shot at it, the redirection on logout should probably happen in a
UserLogoutComplete hook (and if you want to get fancy, it could use an embedded image instead of redirecting the browser - see
CentralAuthHooks::onUserLogoutComplete); the login code should work roughly the way the GoogleLogin extension does (register a PrimaryAuthenticationProvider which returns a ButtonAuthenticationRequest subclass for getAuthenticationRequests and an AuthenticationResponse::newRedirect() on login; disallow account creation; update real name/email after a successful login).