I’m not sure if this is an implementation error on my side or if this is a bug in the SSO implementation of Discourse.
Users having a plus-extension in the local part of their e-mail address got an error since Discourse interpretes the plus sign as space.
Discourse throws the error: “Nonce has already expired” and writes down the e-mail address as “user extension@example.com” with a space instead of a plus sign.
A little late, I know. But in case anyone else runs into this problem.
In fact we should urlencode the payload before base64 encoding. Our wordpress plugin and our ruby implementation both use library functions to build the payload, which automatically takes care of the encoding.