Skip to content

Preserve custom state after redirect #30

Open

Description

@bendavis78

I need to preserve state after redirecting (eg, using a custom parameter), but it seems the state parameter is currently only used for CSRF token. Is there another way to preserve state?

Activity

  1. indepndnt commented on May 29, 2022

    @indepndnt

    I don't believe the state parameter is limited to CSRF token, so you could encode a CSRF token and other state data into the state parameter.

    Better, if there's any non-public data in the state that you want to preserve, would be to store it locally associated with the CSRF token and retrieve it after verifying the CSRF token. IIRC I store the CSRF token as a Redis key with the state for the value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions