We have integrated ORCID login on our page (mostwiedzy.pl) and all was working fine until this Monday, when it stopped.
It turns out that after redirecting to ORCID yours API calls our page with authorization code twice.
So this code is validated twice and of course it generates error
due to token being already used (after successfully accept token
in first request):
Authentication request failed. {"exception":"[object]
(Symfony\\Component\\Security\\Core\\Exception\\AuthenticationException(code:
0): OAuth error: \"Reused authorization code: kQu_K4\"
Debugging your page i also notice this:
Your javascript code fire (and console.out) code verification page twice.
How can i prevent this situation and can you check if this is not your bug?
How can i fix this problem?