Fix authentication state persistence and admin role display

- Implement complete authentication system with JWT token validation
- Add auth provider with persistent login state across page refreshes
- Create multilingual login/register forms with Material-UI components
- Fix token validation using raw SQL queries to bypass Prisma sync issues
- Add comprehensive error handling for expired/invalid tokens
- Create profile and settings pages with full i18n support
- Add proper user role management (admin/user) with database sync
- Implement secure middleware with CSRF protection and auth checks
- Add debug endpoints for troubleshooting authentication issues
- Fix Zustand store persistence for authentication state

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
andupetcu
2025-09-21 01:06:30 +03:00
parent 62ca73b2ac
commit 196ca00194
174 changed files with 181207 additions and 179 deletions

View File

@@ -0,0 +1,97 @@
{
"chapterNum": 40,
"verses": [
{
"verseNum": 1,
"text": "Some time later, the kings cupbearer and baker offended their master, the king of Egypt."
},
{
"verseNum": 2,
"text": "Pharaoh was angry with his two officers, the chief cupbearer and the chief baker,"
},
{
"verseNum": 3,
"text": "and imprisoned them in the house of the captain of the guard, the same prison where Joseph was confined."
},
{
"verseNum": 4,
"text": "The captain of the guard assigned them to Joseph, and he became their personal attendant.\n \nAfter they had been in custody for some time,"
},
{
"verseNum": 5,
"text": "both of these men—the Egyptian kings cupbearer and baker, who were being held in the prison—had a dream on the same night, and each dream had its own meaning."
},
{
"verseNum": 6,
"text": "When Joseph came to them in the morning, he saw that they were distraught."
},
{
"verseNum": 7,
"text": "So he asked the officials of Pharaoh who were in custody with him in his masters house, “Why are your faces so downcast today?”"
},
{
"verseNum": 8,
"text": "“We both had dreams,” they replied, “but there is no one to interpret them.”\n \nThen Joseph said to them, “Dont interpretations belong to God? Tell me your dreams.”"
},
{
"verseNum": 9,
"text": "So the chief cupbearer told Joseph his dream: “In my dream there was a vine before me,"
},
{
"verseNum": 10,
"text": "and on the vine were three branches. As it budded, its blossoms opened and its clusters ripened into grapes."
},
{
"verseNum": 11,
"text": "Pharaohs cup was in my hand, and I took the grapes, squeezed them into his cup, and placed the cup in his hand.”"
},
{
"verseNum": 12,
"text": "Joseph replied, “This is the interpretation: The three branches are three days."
},
{
"verseNum": 13,
"text": "Within three days Pharaoh will lift up your head and restore your position. You will put Pharaohs cup in his hand, just as you did when you were his cupbearer."
},
{
"verseNum": 14,
"text": "But when it goes well for you, please remember me and show me kindness by mentioning me to Pharaoh, that he might bring me out of this prison."
},
{
"verseNum": 15,
"text": "For I was kidnapped from the land of the Hebrews, and even here I have done nothing for which they should have put me in this dungeon.”"
},
{
"verseNum": 16,
"text": "When the chief baker saw that the interpretation was favorable, he said to Joseph, “I too had a dream: There were three baskets of white bread on my head."
},
{
"verseNum": 17,
"text": "In the top basket were all sorts of baked goods for Pharaoh, but the birds were eating them out of the basket on my head.”"
},
{
"verseNum": 18,
"text": "Joseph replied, “This is the interpretation: The three baskets are three days."
},
{
"verseNum": 19,
"text": "Within three days Pharaoh will lift off your head and hang you on a tree. Then the birds will eat the flesh of your body.”"
},
{
"verseNum": 20,
"text": "On the third day, which was Pharaohs birthday, he held a feast for all his officials, and in their presence he lifted up the heads of the chief cupbearer and the chief baker."
},
{
"verseNum": 21,
"text": "Pharaoh restored the chief cupbearer to his position, so that he once again placed the cup in Pharaohs hand."
},
{
"verseNum": 22,
"text": "But Pharaoh hanged the chief baker, just as Joseph had described to them in his interpretation."
},
{
"verseNum": 23,
"text": "The chief cupbearer, however, did not remember Joseph; he forgot all about him."
}
]
}