Skip to content

Example on using state parameter to preserve query string #318

@rpwagner

Description

@rpwagner

What problem are you trying to solve?

When a page receives a set of query parameters like https://example.org/plot.html?file=a.csv I would like to know the appropriate way to persevere the query string file=a.csv after a login redirect. I believe this is typically handled via the state parameter in the OAuth flow, though I could be mistaken.

We are using this model to have a single page that view and interact with data from Globus Collections that require access tokens. This way, way can have a single viewer page and load different files based on the query parameters. Examples of doing this for public data are in our Cheap and FAIR template repo (see the view.md and chart.md pages).

Describe the solution you'd like

It would great to have an example like the basic login page that shows how to use the state parameter or other means to do this.

Describe alternatives you've considered

As a workaround, I will try collecting the parameters prior to creating the login manager and calling manager.handleCodeRedirect() or login().

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions