identityserver-token-exchange icon indicating copy to clipboard operation
identityserver-token-exchange copied to clipboard

Error 500 when trying to refresh refresh token

Open opolo opened this issue 5 years ago • 5 comments

Hi,

Thanks for the work you have done!

I am facing an issue, you might be able to resolve (a lot) better than I currently can: I am using this project through its nuget package. I can provide a facebook access token and get an identity server refresh token and access token back... However, when I try to refresh the refresh token, I get a 500 error back with the top of the stack-trace:

System.NullReferenceException: Object reference not set to an instance of an object.
   at IdentityServer.External.TokenExchange.Services.TokenExchangeProfileService.<IsActiveAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at IdentityServer4.Validation.TokenValidator.<ValidateRefreshTokenAsync>d__16.MoveNext() in C:\local\identity\server4\IdentityServer4\src\IdentityServer4\Validation\TokenValidator.cs:line 425

Do you have any idea as to what might be going wrong? I suspect its something with the users being created through the external auth flow, but the refresh tokens is in the database, based on what I can see... The example project (https://github.com/waqaskhan540/IdentityServerExternalAuth/tree/master/Sample) fails with a 500 error as well, when attempting a refresh token refresh.

Thanks!

opolo avatar Aug 31 '18 09:08 opolo