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

Cannot Register Users - Invalid Session #505

Closed
AYJAYY opened this issue Sep 24, 2015 · 11 comments
Closed

Cannot Register Users - Invalid Session #505

AYJAYY opened this issue Sep 24, 2015 · 11 comments
Labels

Comments

@AYJAYY
Copy link

AYJAYY commented Sep 24, 2015

Ubuntu 14.04
Node 0.12
Port 8080 using IP for domain currently.

I am getting "Invalid Session Your browser attempted to submit form data to /register with an invalid authentication token. This may be because:....." when I attempt to register a user. I have changed the cookie secret and cleared my cookies.

The server throws no errors and the error log is not showing anything. I searched through the issues and there doesn't seem to be anyone else with this issue.

@calzoneman
Copy link
Owner

This comes up quite a bit with people on IRC. The most likely cause is that you have not set the cookie domain correctly in your config.yaml, hence the CSRF prevention cookie is unable to be set/read correctly. Please check your configuration, and if you can't find the problem, then you can paste the configuration here (remove passwords first) and I'd be glad to take a look at it for you.

@AYJAYY
Copy link
Author

AYJAYY commented Sep 24, 2015

Oh my, I cannot believe I missed that. I apologize for taking your time and I thank you for responding so quickly! That was my issue!

@AYJAYY
Copy link
Author

AYJAYY commented Sep 24, 2015

~ Issue Solved - For others - make sure the "root-domain" in the cookies section of the config is set to your current domain. Thanks again!

@AYJAYY AYJAYY closed this as completed Sep 24, 2015
@70hundert
Copy link

Hi there!

I have the same issue, on "register" I get the "invalid authentication token"-message.

After I found this post here I followed the suggestion to set the "root-domain" in the config.yaml (same as,I set the "domain"), but the error is still there. I tried it in different browsers as well.

Any further hint on this will be highly appreciated!

@calzoneman
Copy link
Owner

@70hundert can you sanitize your configuration (remove passwords) and link it so that I can take a look?

@70hundert
Copy link

Hello Calvin!

Thanks for your quick reply!

Here you can see the config.yaml, which content I copied into this file:

http://slopetube.koding.io/config.txt

I only xxx'ed-out the mysql-password and the youtube-api.

@calzoneman
Copy link
Owner

Ah I see, the root domain is just supposed to be the domain itself, without any http:// prefix, since this is how the cookie header expects it. I guess the comments in the config template don't make that clear.

@calzoneman
Copy link
Owner

So in your case, it should be slopetube.koding.io

@70hundert
Copy link

Thanks again for the fast response!

So I edited my config.yaml file as you suggested, I changed line 53 to:

root-domain: 'slopetube.koding.io'

So now the registering and login is working! Great!

Then I was able to create a new channel for testing purposes. But by entering this channel, now I get the following error-message:

Uh oh!
It appears the connection to http://localhost:1337 has failed. If this error persists, a firewall or antivirus is likely blocking the connection, or the server is down.

I also can't use the search in youtube-searchnor adding a video by url; also any Channel-setting I made didn't get saved, for example setting the channel being liste publicy. But I guess this is related to the error?

@calzoneman
Copy link
Owner

You need to fill in the http://domain under the io: section of the configuration as well.

@70hundert
Copy link

You are my hero, thanks a lot again! Gonna test the whole thing and gonna hopefully do a donation soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants