Admin user can not login on localhost

I am new to squidex and am want to try it out locally but I can’t get it to work. I am using a modified version of this docker-compose file: https://github.com/Squidex/squidex/blob/master/backend/tests/docker-compose.yml

Starting up seems to work and I also don’t get any errors for the account creation.

version: '3'
services:
  mongo:
    image: mongo:latest
    ports:
      - "27017:27017"
    networks:
      - internal

  squidex:
    image: squidex/squidex:latest
    ports:
      - "8080:80"
    environment:
      - URLS__BASEURL=http://localhost:8080
      - EVENTSTORE__MONGODB__CONFIGURATION=mongodb://mongo
      - IDENTITY__ADMINEMAIL=myemail@domain.com
      - IDENTITY__ADMINPASSWORD=wN6MGS7@quM2
      - IDENTITY__ADMINCLIENTID=root
      - IDENTITY__ADMINCLIENTSECRET=xeLd6jFxqbXJrfmNLlO2j1apagGGGSyZJhFnIuHp4I0=
      - STORE__MONGODB__CONFIGURATION=mongodb://mongo
      - STORE__TYPE=MongoDB
      - GRAPHQL__CACHEDURATION=0
    networks:
      - internal
    depends_on:
      - mongo
    
networks:
  internal:
    driver: bridge

I am never able to login though. I don’t get an error, but when I enter the adminuser email and password it just forwards me again to the login popup without an error message. In the logs I get this error though, when I open the login popup though:

squidex_1  | {
squidex_1  |   "logLevel": "Error",
squidex_1  |   "message": "An exception was thrown while deserializing the token.",
squidex_1  |   "eventId": {
squidex_1  |     "id": 7,
squidex_1  |     "name": "TokenDeserializeException"
squidex_1  |   },
squidex_1  |   "timestamp": "2021-03-05T17:45:52Z",
squidex_1  |   "app": {
squidex_1  |     "name": "Squidex",
squidex_1  |     "version": "4.0.0.0",
squidex_1  |     "sessionId": "cbe16b70-5c1e-45b5-8fd3-f117cd3d4f36"
squidex_1  |   },
squidex_1  |   "web": {
squidex_1  |     "requestId": "00-5687f0676a01b4418394d75f54c67c43-1888e99d98668d4b-00",
squidex_1  |     "requestPath": "/Account/Login",
squidex_1  |     "requestMethod": "GET",
squidex_1  |     "routeValues": {
squidex_1  |       "area": "IdentityServer",
squidex_1  |       "action": "Login",
squidex_1  |       "controller": "Account"
squidex_1  |     }
squidex_1  |   },
squidex_1  |   "category": "Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery",
squidex_1  |   "exception": {
squidex_1  |     "type": "Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException",
squidex_1  |     "message": "The antiforgery token could not be decrypted.",
squidex_1  |     "stackTrace": "   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgeryTokenSerializer.Deserialize(String serializedToken)\n   at Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery.GetCookieTokenDoesNotThrow(HttpContext httpContext)"
squidex_1  |   }
squidex_1  | }

can someone help me and tell me what I do wrong?

I don’t know to be honest. Have never seen that.

Ok I tested on my Windows 10 client now, and I can still not login. What is weird though is that I don’t get the error messages that I have in the logs on my other Client (Ubuntu 20.04). The logged error seems to have no connection to the problem with login actually.

Tried with Chrome and Microsoft Edge, same behaviour…

Probably because you are running with http. Chrome does not allow certain logging scenarios anymore. Therefore you always have to use https.

Wow, that was it. Didn’t know it would matter for localhost. Thanks @Sebastian!

For everyone else that runs into the same issue, just use this docker-compose:

Instead of this one:

1 Like

Yes, the second one is only used for my automated API tests