You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find myself having to debug auth-related code from time to time in several services.
Sometimes I need to check if a token has changed or compare whether an object is using same token as somewhere else. And I need to do this outside my local development environment.
Obviously, printing a token is a big no-no.
As far as I know there is no safe way to do this with the libraries' built-in functions. Is there?
What I'm currently doing is creating a SHA256 hash of the token to prevent its use and base64-encode the result for readability and compactness before printing it. AFAICT, there is no security risk in doing this. Also, I'm not aware of any existing method/function specifically for this. Is there?
Anyone knows a more idiomatic/terse/compact method to accomplish this?
Would such a helper feature/function be an acceptable contribution?
The text was updated successfully, but these errors were encountered:
I find myself having to debug auth-related code from time to time in several services.
Sometimes I need to check if a token has changed or compare whether an object is using same token as somewhere else. And I need to do this outside my local development environment.
Obviously, printing a token is a big no-no.
As far as I know there is no safe way to do this with the libraries' built-in functions. Is there?
What I'm currently doing is creating a SHA256 hash of the token to prevent its use and base64-encode the result for readability and compactness before printing it. AFAICT, there is no security risk in doing this. Also, I'm not aware of any existing method/function specifically for this. Is there?
Anyone knows a more idiomatic/terse/compact method to accomplish this?
Would such a helper feature/function be an acceptable contribution?
The text was updated successfully, but these errors were encountered: