mostly taken from https://github.com/ferdinandkeil/nginxwebauthn