Can not Sign into ghost locally

Hi I’m new to Ghost cms or any cms. I’m trying to use Ghost locally. I’m following this official guide How to install Ghost locally on Mac, PC or Linux
While I’m able start the site, I’m not able to sign in to admin. When I press the signin button it stays on the same page
I checked sqlite db and I can see one entry in User. So database entry is there.

  • What’s your URL? This is the easiest way for others to debug your issue
    Running Locally

  • What version of Ghost are you using?
    Ghost-CLI version: 1.21.0
    Ghost version: 5.3.0

  • What configuration?
    config.development.json is default. I haven’t changed anything.

{
  "url": "http://localhost:2368/",
  "server": {
    "port": 2368,
    "host": "127.0.0.1"
  },
  "database": {
    "client": "sqlite3",
    "connection": {
      "filename": "D:\\Programming\\Ghost_local\\content\\data\\ghost-local.db"
    }
  },
  "mail": {
    "transport": "Direct"
  },
  "logging": {
    "transports": [
      "file",
      "stdout"
    ]
  },
  "process": "local",
  "paths": {
    "contentPath": "D:\\Programming\\Ghost_local\\content"
  }
}

  • What browser?
    Google Chrome : Version 103.0.5060.114 (Official Build) (64-bit)

  • What errors or information do you see in the console?

GET http://localhost:2368/ghost/api/admin/users/me/?include=roles 403 (Forbidden)

This was the response in network tab

{
  "errors": [
    {
      "message": "Authorization failed",
      "context": "Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.",
      "type": "NoPermissionError",
      "details": null,
      "property": null,
      "help": null,
      "code": null,
      "id": "bd656760-03a5-11ed-a171-dd40a18bf295",
      "ghostErrorCode": null
    }
  ]
}
  • What steps could someone else take to reproduce the issue you’re having?
    Not sure just follow the official guide…?

Here’s my Error Log file

{
  "name": "Log",
  "hostname": "",
  "pid": 20368,
  "level": 50,
  "req": {
    "meta": {
      "requestId": "b3621766-7b89-432d-a8ff-173571c53d9b",
      "userId": null
    },
    "url": "/users/",
    "method": "GET",
    "originalUrl": "/ghost/api/admin/users/",
    "params": {},
    "headers": {
      "host": "localhost:2368",
      "connection": "keep-alive",
      "cache-control": "max-age=0",
      "sec-ch-ua": "\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\"",
      "sec-ch-ua-mobile": "?0",
      "sec-ch-ua-platform": "\"Windows\"",
      "dnt": "1",
      "upgrade-insecure-requests": "1",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
      "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
      "sec-fetch-site": "none",
      "sec-fetch-mode": "navigate",
      "sec-fetch-user": "?1",
      "sec-fetch-dest": "document",
      "accept-encoding": "gzip, deflate, br",
      "accept-language": "en-US,en;q=0.9"
    },
    "query": {}
  },
  "res": {
    "_headers": {
      "x-powered-by": "Express",
      "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
      "content-type": "application/json; charset=utf-8",
      "content-length": "343",
      "etag": "W/\"157-JsI+kagJppDV9lYmzwjC7Tw/q/Y\"",
      "vary": "Accept-Encoding"
    },
    "statusCode": 403,
    "responseTime": "1ms"
  },
  "err": {
    "id": "d4240150-03a5-11ed-a171-dd40a18bf295",
    "domain": "http://localhost:2368/",
    "code": null,
    "name": "NoPermissionError",
    "statusCode": 403,
    "level": "normal",
    "message": "Authorization failed",
    "context": "\"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.\"",
    "stack": "NoPermissionError: Authorization failed\n    at authorizeAdminApi (Ghost_local\\versions\\5.3.0\\core\\server\\services\\auth\\authorize.js:33:25)\n    at Layer.handle [as handle_request] (Ghost_local\\versions\\5.3.0\\node_modules\\express\\lib\\router\\layer.js:95:5)\n    at next (Ghost_local\\versions\\5.3.0\\node_modules\\express\\lib\\router\\route.js:144:13)\n    at authenticate (Ghost_local\\versions\\5.3.0\\core\\server\\services\\auth\\session\\middleware.js:28:13)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
    "hideStack": false
  },
  "msg": "Authorization failed",
  "time": "2022-07-14T18:50:28.198Z",
  "v": 0
}
{
  "name": "Log",
  "hostname": "",
  "pid": 20368,
  "level": 50,
  "req": {
    "meta": {
      "requestId": "a3f5e7ce-1d93-4d1a-965b-b837bff6d012",
      "userId": null
    },
    "url": "/users/me/",
    "method": "GET",
    "originalUrl": "/ghost/api/admin/users/me/",
    "params": {},
    "headers": {
      "host": "localhost:2368",
      "connection": "keep-alive",
      "cache-control": "max-age=0",
      "sec-ch-ua": "\".Not/A)Brand\";v=\"99\", \"Google Chrome\";v=\"103\", \"Chromium\";v=\"103\"",
      "sec-ch-ua-mobile": "?0",
      "sec-ch-ua-platform": "\"Windows\"",
      "dnt": "1",
      "upgrade-insecure-requests": "1",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36",
      "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
      "sec-fetch-site": "none",
      "sec-fetch-mode": "navigate",
      "sec-fetch-user": "?1",
      "sec-fetch-dest": "document",
      "accept-encoding": "gzip, deflate, br",
      "accept-language": "en-US,en;q=0.9"
    },
    "query": {}
  },
  "res": {
    "_headers": {
      "x-powered-by": "Express",
      "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0",
      "content-type": "application/json; charset=utf-8",
      "content-length": "343",
      "etag": "W/\"157-mavntxYu05qQerDBZCHp2PNfbz0\"",
      "vary": "Accept-Encoding"
    },
    "statusCode": 403,
    "responseTime": "9ms"
  },
  "err": {
    "id": "d0680ac0-03a5-11ed-a171-dd40a18bf295",
    "domain": "http://localhost:2368/",
    "code": null,
    "name": "NoPermissionError",
    "statusCode": 403,
    "level": "normal",
    "message": "Authorization failed",
    "context": "\"Unable to determine the authenticated user or integration. Check that cookies are being passed through if using session authentication.\"",
    "stack": "NoPermissionError: Authorization failed\n    at authorizeAdminApi (Ghost_local\\versions\\5.3.0\\core\\server\\services\\auth\\authorize.js:33:25)\n    at Layer.handle [as handle_request] (Ghost_local\\versions\\5.3.0\\node_modules\\express\\lib\\router\\layer.js:95:5)\n    at next (Ghost_local\\versions\\5.3.0\\node_modules\\express\\lib\\router\\route.js:144:13)\n    at authenticate (Ghost_local\\versions\\5.3.0\\core\\server\\services\\auth\\session\\middleware.js:28:13)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (node:internal/process/task_queues:96:5)",
    "hideStack": false
  },
  "msg": "Authorization failed",
  "time": "2022-07-14T18:50:21.941Z",
  "v": 0
}

It looks like you’re on a version that’s 1 patch out of date. If you upgrade to 5.3.1 the http login problem should be fixed :slight_smile:

2 Likes

Thank you. After updating to 5.3.1 I’m able to singin and access the admin panel.