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": 39,
"verses": [
{
"verseNum": 1,
"text": "Meanwhile, Joseph had been taken down to Egypt, where an Egyptian named Potiphar, an officer of Pharaoh and captain of the guard, bought him from the Ishmaelites who had taken him there."
},
{
"verseNum": 2,
"text": "And the LORD was with Joseph, and he became a successful man, serving in the household of his Egyptian master."
},
{
"verseNum": 3,
"text": "When his master saw that the LORD was with him and made him prosper in all he did,"
},
{
"verseNum": 4,
"text": "Joseph found favor in his sight and became his personal attendant.\n \nPotiphar put him in charge of his household and entrusted him with everything he owned."
},
{
"verseNum": 5,
"text": "From the time that he put Joseph in charge of his household and all he owned, the LORD blessed the Egyptians household on account of him. The LORDs blessing was on everything he owned, both in his house and in his field."
},
{
"verseNum": 6,
"text": "So Potiphar left all that he owned in Josephs care; he did not concern himself with anything except the food he ate.\n \nNow Joseph was well-built and handsome,"
},
{
"verseNum": 7,
"text": "and after some time his masters wife cast her eyes upon Joseph and said, “Sleep with me.”"
},
{
"verseNum": 8,
"text": "But he refused. “Look,” he said to his masters wife, “with me here, my master does not concern himself with anything in his house, and he has entrusted everything he owns to my care."
},
{
"verseNum": 9,
"text": "No one in this house is greater than I am. He has withheld nothing from me except you, because you are his wife. So how could I do such a great evil and sin against God?”"
},
{
"verseNum": 10,
"text": "Although Potiphars wife spoke to Joseph day after day, he refused to go to bed with her or even be near her."
},
{
"verseNum": 11,
"text": "One day, however, Joseph went into the house to attend to his work, and not a single household servant was inside."
},
{
"verseNum": 12,
"text": "She grabbed Joseph by his cloak and said, “Sleep with me!” But leaving his cloak in her hand, he escaped and ran outside."
},
{
"verseNum": 13,
"text": "When she saw that he had left his cloak in her hand and had run out of the house,"
},
{
"verseNum": 14,
"text": "she called her household servants. “Look,” she said, “this Hebrew has been brought to us to make sport of us. He came to me so he could sleep with me, but I screamed as loud as I could."
},
{
"verseNum": 15,
"text": "When he heard me scream for help, he left his cloak beside me and ran out of the house.”"
},
{
"verseNum": 16,
"text": "So Potiphars wife kept Josephs cloak beside her until his master came home."
},
{
"verseNum": 17,
"text": "Then she told him the same story: “The Hebrew slave you brought us came to me to make sport of me,"
},
{
"verseNum": 18,
"text": "but when I screamed for help, he left his cloak beside me and ran out of the house.”"
},
{
"verseNum": 19,
"text": "When his master heard the story his wife told him, saying, “This is what your slave did to me,” he burned with anger."
},
{
"verseNum": 20,
"text": "So Josephs master took him and had him thrown into the prison where the kings prisoners were confined.\n \nWhile Joseph was there in the prison,"
},
{
"verseNum": 21,
"text": "the LORD was with him and extended kindness to him, granting him favor in the eyes of the prison warden."
},
{
"verseNum": 22,
"text": "And the warden put all the prisoners under Josephs care, so that he was responsible for all that was done in the prison."
},
{
"verseNum": 23,
"text": "The warden did not concern himself with anything under Josephs care, because the LORD was with Joseph and gave him success in whatever he did."
}
]
}