Closed ARM-Source closed 3 years ago
If it gets to the point where it makes the token request, then everything is fine in the client from oidc-client-js's perspective. Invalid grant means the code is invalid, but you'd need to check your token server logs. Refreshing the page will trigger invalid state error, because the state that was holding the prior request's data was consumed.
Hey brock! Thanks for answering. I Can't get Identity Server to Log to Azure Log Stream with the Default Identity Server 4 settings, do you have any hints on what I should be doing? My code looks identical to this http://docs.identityserver.io/en/latest/topics/logging.html, in the mean while I am going to look at the deployment documentation for Identity Server 4 see if there's a solution there. Do I need a Certificate or can I use a the self signed one builder.AddDeveloperSigningCredential();?
I believe we are also having this issue. @ARM-Source is this issue for every user or only specific users?
Hi rob! Its for every user on dev, staging and production environments. My workaround is to switch to the Implicit flow. With me it also seemed to be that the code was to long for the URL, although I cannot say for certain. https://github.com/IdentityModel/oidc-client-js/issues/1320
Here is the Stackoverflow question: https://stackoverflow.com/questions/66687890/angular-application-signin-redirect-fails-with-invalid-grant-error-when-runnin
I will paste the entire question in here aswell.
I am using oidc-client with Angular to log in to my identity server. When running both applications on the same machine everything works perfectly.
However when I run my Identity Server on a Web Apps server and my Angular Application on a Static Web App I get an error "invalid_grant".
PROBLEM DESCRIPTION
ASSUMPTION I think the Angular application is having trouble storing the information from the signin-callback in the application storage.
IDENTITY SERVER CONFIGURATION CODE
ANGULAR OIDC-CLIENT AUTH CONFIG CODE
SIGNIN REDIRECT CALLBACK CODE User Manager is an inherited class from oidc-client. When debugging the code does not enter the .then and I can't debug any further than here. But I think whatever happens after this is where the code fails.
SIGNIN CALLBACK CODE
NETWORK PICTURE Network traffic on fail
If theres anything missing in my question at all please let me know.
EVNIRONMENT FILE