-
Notifications
You must be signed in to change notification settings - Fork 36
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
Fixing ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken) #19
Comments
Hi @NorfeldtAbtion! In first part of the tutorial we configure our front–end to send a proper CSRF token with each request (in the paragraph starting with |
I realized that when I got further down - just wanted to test the queries like described in the tutorial. It's a great tutorial - I'm learning a lot. |
Great, I'm happy we've figured it out! Closing the issue for now, don't hesitate to reach out if you have any troubles |
@DmitryTsepelev I still have one question related to this topic. I got to the part 3 and can't seem to figure out how to get GraphiQL to show the scheme with the current auth. How did you get it to show: Guessing that I need to set the headers - but unsure about how to do the CSFR token |
Looks like graphiql-rails should set up CSRF token for us, no action should be required. Could you please make sure it's being correctly set up? |
just started following you tutorial (rails and graphql newbie) and got this error on my first query
The fix was to
(could also have chosen to uncomment the
protect_from_forgery with: :null_session
that was given by the graphql generator but followed the recommendation from https://stackoverflow.com/a/34252150/618099 )just wanted to share that with you and others trying out the tutorial.
The text was updated successfully, but these errors were encountered: