-
-
Notifications
You must be signed in to change notification settings - Fork 59
chore: remove Lucia from lucia
#98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Starting the dev server gives me the following error, though i'm unable to locate what it thinks is wrong: I was currently testing on a JS project, if that helps
Details
4:14:18 PM [vite] Pre-transform error: Expected '{', got 'type'
4:14:19 PM [vite] Error when evaluating SSR module /src/lib/server/auth.js:
|- RollupError: Expected '{', got 'type'
at getRollupError (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at convertProgram (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1070:26)
at parseAstAsync (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1924:93)
at async ssrTransformScript (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52319:11)
at async loadAndTransform (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51917:72)
at async instantiateModule (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44)
4:14:19 PM [vite] Error when evaluating SSR module /src/hooks.server.js:
|- RollupError: Expected '{', got 'type'
at getRollupError (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at convertProgram (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1070:26)
at parseAstAsync (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1924:93)
at async ssrTransformScript (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52319:11)
at async loadAndTransform (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51917:72)
at async instantiateModule (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44)
Error [RollupError]: Expected '{', got 'type'
at getRollupError (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at convertProgram (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1070:26)
at parseAstAsync (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1924:93)
at async ssrTransformScript (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52319:11)
at async loadAndTransform (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51917:72)
at async instantiateModule (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) {
code: 'PARSE_ERROR',
pos: 518
}
Error [RollupError]: Expected '{', got 'type'
at getRollupError (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
at convertProgram (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1070:26)
at parseAstAsync (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/rollup@4.22.5/node_modules/rollup/dist/es/shared/parseAst.js:1924:93)
at async ssrTransformScript (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52319:11)
at async loadAndTransform (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:51917:72)
at async instantiateModule (file:///D:/dev/web/svelte-cli-temp/node_modules/.pnpm/vite@5.4.8_@types+node@22.7.5/node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:52817:44) {
code: 'PARSE_ERROR',
pos: 518
}
Additionally it generates this while running in a js project
// src\lib\server\db\schema.js
export type Session = typeof session.$inferSelect;
export type User = typeof user.$inferSelect;
This is in a better state now. Opened for further reviews and can merge once ready |
Perhaps we should move some of the logic into a As far as name, I agree Oslo doesn't feel right. I think it would make sense in the short-term, but as we add more functionality like OAuth, etc. we'll start using more libraries and then it wouldn't fit anymore. I think we could probably just call it "Auth". It wouldn't make sense to have "Auth" under "Auth" with the current main screen, but I think we could tweak that. E.g. put it under "Additional functionality" and then it would be fine |
hmmm, I don't know. I think there's still value in calling it "Lucia" even if I'd like to think of it as if I were to make a |
It's true that we are for now, but what if we want to diverge a bit? E.g. we may offer things that aren't in their guide, change how things are setup, etc. |
I wonder actually if we should just go ahead and setup https://svelte.dev/docs/kit/auth as a URL to point to. It kind of feels like a nice thing for us to own. Let me try prototyping that real quick and see what it would look like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the generated +page.svelte
and +page.server.js
have two line breaks after the imports.
I have never seen a one liner for jsdoc comments (expect for @type
) but it works, so I personally wouldn't bother.
/** @returns {string} */
function generateSessionToken() {
Apart from that everything seems to be working. Also tested the demo which ran just fine
closes #68
Outstanding questions:
It's effectively still 'Lucia', just without the library. We could call it 'Oslo', but it has less name recognition and I don't think that would be technically correct either. Oslo provides some of the auth utilities (mainly the encoding and crypto bits), but it doesn't touch sessions.