Skip to content
Open

stash #388

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,21 @@ export default defineConfig({
},
},
}),
// env: {
// validateSecrets: true,
// schema: {
// BETTER_AUTH_SECRET: envField.string({
// context: "server",
// access: "secret",
// })
// }
// }
env: {
validateSecrets: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Even without this setting it errors, but then just when hitting the import. Nevertheless, it should work with this option true

schema: {
BETTER_AUTH_SECRET: envField.string({
context: "server",
access: "secret",
}),
GITHUB_CLIENT_SECRET: envField.string({
context: "server",
access: "secret",
}),
GITHUB_CLIENT_ID: envField.string({
context: "server",
access: "public",
})
Comment on lines +105 to +108
Copy link
Member Author

Choose a reason for hiding this comment

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

The public env var is already configured for you in the default place wrangler.jsonc

}
}
});
1 change: 1 addition & 0 deletions src/lib/auth.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { betterAuth } from 'better-auth';
import { admin, oAuthProxy } from 'better-auth/plugins';
import { D1Dialect } from 'kysely-d1';
import { BETTER_AUTH_SECRET } from 'astro:env/server';

export const auth = (url: string, env: Env) => {
return betterAuth({
Expand Down