Continuing error 403 during authorization code flow

Hi

This is a continuation of this discussion Authorisation code flow: Error 403 - Auth0 Community

After following the advice, it worked for 2 - 3 logins and then it stopped, I have continued to receive the 403 error {“error”:“invalid_grant”,“error_description”:“Invalid authorization code”} .

A time out seems unlikely as I am making the token request less than 0.5 seconds after the authorization code is generated. I cannot think of any other explanations though so any help will be appreciated.

I have been able to recreate the problem, though it has left me baffled. It appears to be a problem on the client server side and I noticed that switching git branch removed the error, and restarting shiny server returns the error.

In order to explain, I created two identical branches of the app on github.

When the app is first first loaded, an error 403 occurs at the token request step.

I enter ‘git switch branch2’ on the linux server

Now the token request is accepted and I am able to validate the id_token.

I restart shiny server.

Now the error is back.

I enter ‘git switch branch1’ and the the token request is accepted.

I guess this is not an auth0 problem now but any help would be appreciated.