When creating a new book sometimes it will show a warning about "Unauthorized action"
Current behavior
Sometimes when I try to create books as any user, either by clicking "Start writing your book" or "Import your files button", I get "Unauthorized action: You don't have permissions to access this resource you will be redirected back to a safe place", like in the screenshot below.
I can't distinguish any error in the terminal:
server_1 | [BOOK CONTROLLER] - createBook: book's Front matter division updated with the special component/s
server_1 | >>> fetching specific templates based on target and trim size were applicable
server_1 | >>> fetching specific templates based on target and trim size were applicable
server_1 | >>> fetching specific templates based on target and trim size were applicable
server_1 | >>> fetching specific templates based on target and trim size were applicable
server_1 | [USER CONTROLLER] - getUser: fetching user with id 29065e90-1c99-4d9c-ac0f-42f3cf1a3d28
server_1 | book resolver: broadcasting new book to clients
server_1 | ::ffff:192.168.96.1 - - [05/Sep/2023:14:35:27 +0000] "POST /graphql HTTP/1.1" 200 103 "http://localhost:4000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
server_1 |
server_1 | book resolver: executing getBooks use case
server_1 | [BOOK CONTROLLER] - getBooks: fetching books for user with id 29065e90-1c99-4d9c-ac0f-42f3cf1a3d28
server_1 | ::ffff:192.168.96.1 - - [05/Sep/2023:14:35:27 +0000] "POST /graphql HTTP/1.1" 200 1239 "http://localhost:4000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
server_1 |
server_1 | book resolver: executing getBooks use case
server_1 | [BOOK CONTROLLER] - getBooks: fetching books for user with id 29065e90-1c99-4d9c-ac0f-42f3cf1a3d28
server_1 | ::ffff:192.168.96.1 - - [05/Sep/2023:14:35:28 +0000] "POST /graphql HTTP/1.1" 200 1239 "http://localhost:4000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
Steps to reproduce
I can't point a way to reproduce this, but it seems that it happens when I create books quickly one after another. After bumping into this and closing the warning, sometimes I will get this warning every time when creating a new book until I reload the page.
Environment
[Provide browser name and version and if you're working from a PC or Mac]
Possible solution
[Not required. Suggest a fix for the bug]