pyroscope icon indicating copy to clipboard operation
pyroscope copied to clipboard

Oauth: make it so that you get redirected to the proper page after login

Open petethepig opened this issue 2 years ago • 1 comments

Currently if a user opens a pyroscope link (e.g /?query=cart.service.dotnet.cpu%7B%7D) and they are not authenticated, we redirect them to oauth authentication flow. After they're done we redirect them to /, thus losing the original URL they were trying to open. We should preserve that original URL and redirect to it after the user is done with the login flow.

petethepig avatar Apr 19 '22 18:04 petethepig

I'm thinking maybe when we do the redirect we could preserve the URL in a cookie (or localstorage) and then after login we could check if this cookie exists and redirect.

I think another important thing with this feature is tests — ideally a cypress test to confirm that this stuff works, because I imagine we might change the authentication flow in the future.

petethepig avatar Jul 06 '22 07:07 petethepig