Skip to content

Conversation

@huseeiin
Copy link

No description provided.

Copy link

@ERmilburn02 ERmilburn02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mostly just have some issues with some changes to the packages that didn't need to be changed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was Typescript added as a dependency to the root project?

"@lucia-auth/adapter-sqlite": "^3.0.1",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0",
"@types/better-sqlite3": "^7.6.10",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were types moved to regular dependencies?

"@lucia-auth/adapter-sqlite": "^3.0.1",
"@solidjs/router": "^0.13.3",
"@solidjs/start": "^1.0.0",
"@types/better-sqlite3": "^7.6.10",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why are types in regular dependencies? They're not required at runtime, only during development.

return sendRedirect(event, "/");
const cookie = lucia.createSessionCookie(session.id);

setCookie(cookie.name, cookie.value, cookie.attributes);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be returning here, otherwise you throw an error because you try to add the user to the database again

const cookie = lucia.createSessionCookie(session.id);

setCookie(cookie.name, cookie.value, cookie.attributes);
return Response.redirect("/");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is throwing a type error because it can't parse the URL. Instead you should probably use redirect from @solidjs/router

@greglearns
Copy link

greglearns commented Oct 19, 2024

@ERmilburn02 I read the comments in this PR, saw that it hasn't been merged, and created a new PR that fixes the problem, but also does the minimum changes in order to fix the code to bring it up to date with the main branch, so the new PR should be easier to approve and merge: #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants