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,133 @@
{
"chapterNum": 32,
"verses": [
{
"verseNum": 1,
"text": "Jacob also went on his way, and the angels of God met him."
},
{
"verseNum": 2,
"text": "When Jacob saw them, he said, “This is the camp of God.” So he named that place Mahanaim."
},
{
"verseNum": 3,
"text": "Jacob sent messengers ahead of him to his brother Esau in the land of Seir, the country of Edom."
},
{
"verseNum": 4,
"text": "He instructed them, “You are to say to my master Esau, Your servant Jacob says: I have been staying with Laban and have remained there until now."
},
{
"verseNum": 5,
"text": "I have oxen, donkeys, flocks, menservants, and maidservants. I have sent this message to inform my master, so that I may find favor in your sight.’”"
},
{
"verseNum": 6,
"text": "When the messengers returned to Jacob, they said, “We went to your brother Esau, and now he is coming to meet you—he and four hundred men with him.”"
},
{
"verseNum": 7,
"text": "In great fear and distress, Jacob divided his people into two camps, as well as the flocks and herds and camels."
},
{
"verseNum": 8,
"text": "He thought, “If Esau comes and attacks one camp, then the other camp can escape.”"
},
{
"verseNum": 9,
"text": "Then Jacob declared, “O God of my father Abraham, God of my father Isaac, the LORD who told me, Go back to your country and to your kindred, and I will make you prosper,"
},
{
"verseNum": 10,
"text": "I am unworthy of all the kindness and faithfulness You have shown Your servant. Indeed, with only my staff I came across the Jordan, but now I have become two camps."
},
{
"verseNum": 11,
"text": "Please deliver me from the hand of my brother Esau, for I am afraid that he may come and attack me and the mothers and children with me."
},
{
"verseNum": 12,
"text": "But You have said, I will surely make you prosper, and I will make your offspring like the sand of the sea, too numerous to count.’”"
},
{
"verseNum": 13,
"text": "Jacob spent the night there, and from what he had brought with him, he selected a gift for his brother Esau:"
},
{
"verseNum": 14,
"text": "200 female goats, 20 male goats, 200 ewes, 20 rams,"
},
{
"verseNum": 15,
"text": "30 milk camels with their young, 40 cows, 10 bulls, 20 female donkeys, and 10 male donkeys."
},
{
"verseNum": 16,
"text": "He entrusted them to his servants in separate herds and told them, “Go on ahead of me, and keep some distance between the herds.”"
},
{
"verseNum": 17,
"text": "He instructed the one in the lead, “When my brother Esau meets you and asks, To whom do you belong, where are you going, and whose animals are these before you?"
},
{
"verseNum": 18,
"text": "then you are to say, They belong to your servant Jacob. They are a gift, sent to my lord Esau. And behold, Jacob is behind us.’”"
},
{
"verseNum": 19,
"text": "He also instructed the second, the third, and all those following behind the herds: “When you meet Esau, you are to say the same thing to him."
},
{
"verseNum": 20,
"text": "You are also to say, Look, your servant Jacob is right behind us.’” For he thought, “I will appease Esau with the gift that is going before me. After that I can face him, and perhaps he will accept me.”"
},
{
"verseNum": 21,
"text": "So Jacobs gifts went on before him, while he spent the night in the camp."
},
{
"verseNum": 22,
"text": "During the night Jacob got up and took his two wives, his two maidservants, and his eleven sons, and crossed the ford of the Jabbok."
},
{
"verseNum": 23,
"text": "He took them and sent them across the stream, along with all his possessions."
},
{
"verseNum": 24,
"text": "So Jacob was left all alone, and there a man wrestled with him until daybreak."
},
{
"verseNum": 25,
"text": "When the man saw that he could not overpower Jacob, he struck the socket of Jacobs hip and dislocated it as they wrestled."
},
{
"verseNum": 26,
"text": "Then the man said, “Let me go, for it is daybreak.”\n \nBut Jacob replied, “I will not let you go unless you bless me.”"
},
{
"verseNum": 27,
"text": "“What is your name?” the man asked.\n \n“Jacob,” he replied."
},
{
"verseNum": 28,
"text": "Then the man said, “Your name will no longer be Jacob, but Israel, because you have struggled with God and with men, and you have prevailed.”"
},
{
"verseNum": 29,
"text": "And Jacob requested, “Please tell me your name.”\n \nBut he replied, “Why do you ask my name?” Then he blessed Jacob there."
},
{
"verseNum": 30,
"text": "So Jacob named the place Peniel, saying, “Indeed, I have seen God face to face, and yet my life was spared.”"
},
{
"verseNum": 31,
"text": "The sun rose above him as he passed by Penuel, and he was limping because of his hip."
},
{
"verseNum": 32,
"text": "Therefore to this day the Israelites do not eat the tendon which is at the socket of the hip, because the socket of Jacobs hip was struck near that tendon."
}
]
}