Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GraphiQL] Change updateURL Behaviour #386

Closed
blakeembrey opened this issue May 10, 2017 · 3 comments
Closed

[GraphiQL] Change updateURL Behaviour #386

blakeembrey opened this issue May 10, 2017 · 3 comments

Comments

@blakeembrey
Copy link
Contributor

blakeembrey commented May 10, 2017

I started using GraphiQL with an API and needed authentication to work, so I worked around this by having the API to respond to a specific referrer auth errors by sending the implicit OAuth 2.0 URL that people can see in the panel. Unfortunately, when someone types it wipes out the existing state in the URL. Is it possible to retain window.location.hash instead of wiping it out so subsequent attempts can use the token? Either that, or disabling the history.replaceState, would likely work. Happy to submit a PR.

Side note: Authentication with this approach is a little backward, but I think it turned out really nicely for demonstrating an API-first application by prompting ways to get a token without much interruption.

@blakeembrey blakeembrey changed the title Change updateURL Behaviour [GraphiQL] Change updateURL Behaviour May 10, 2017
@stubailo
Copy link
Contributor

I think this might be better filed here! https://github.com/graphql/graphiql

@blakeembrey
Copy link
Contributor Author

@stubailo
Copy link
Contributor

You know what, you're totally right!

I think if you send a PR with an option to disable that, we'll happily accept it!

@DxCx DxCx closed this as completed in #389 May 24, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants