How to properly sarialize/deserialize RefreshTokens to/from string?
I have to make my server "reboot safe" for already working applications and I want to implement my own RefreshTokenStore to allow refresh tokens survive a server restarts.
Unfortunately when I try to simple serialize them to JSON using Newtonsoft I'm getting error:
Self referencing loop detected for property 'Subject' with type 'System.Security.Claims.ClaimsIdentity'. Path 'AccessToken.Claims[10].Subject.Claims[0]'.
So my question is: what is the proper way to do that?
How to properly sarialize/deserialize RefreshTokens to/from string?
I have to make my server "reboot safe" for already working applications and I want to implement my own RefreshTokenStore to allow refresh tokens survive a server restarts.
Unfortunately when I try to simple serialize them to JSON using Newtonsoft I'm getting error:
So my question is: what is the proper way to do that?