Skip to content

Commit

Permalink
Add GitHub credentials & change domain
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Dec 23, 2024
1 parent 06aaa57 commit c742e59
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 7 deletions.
6 changes: 3 additions & 3 deletions infra/dns.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const domain =
{
production: 'sivir.tech',
dev: 'dev.sivir.tech',
}[$app.stage] || `${$app.stage}.sivir.tech`
production: 'merlijn.site',
dev: 'dev.merlijn.site',
}[$app.stage] || `${$app.stage}.merlijn.site`
4 changes: 2 additions & 2 deletions infra/secret.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const secret = {
DATABASE_URL: new sst.Secret('DATABASE_URL'),
STRIPE_PUBLIC_KEY: new sst.Secret('STRIPE_PUBLIC_KEY'),
STRIPE_SECRET_KEY: new sst.Secret('STRIPE_SECRET_KEY'),
// GITHUB_CLIENT_ID: new sst.Secret('GITHUB_CLIENT_ID'),
// GITHUB_CLIENT_SECRET: new sst.Secret('GITGUB_CLIENT_SECRET'),
GITHUB_CLIENT_ID: new sst.Secret('GITHUB_CLIENT_ID'),
GITHUB_CLIENT_SECRET: new sst.Secret('GITHUB_CLIENT_SECRET'),
HONEYPOT_ENCRYPTION_SEED: new sst.Secret('HONEYPOT_ENCRYPTION_SEED'),
}
2 changes: 2 additions & 0 deletions infra/www.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export const www = new sst.aws.Remix('Remix', {
secret.DATABASE_URL,
secret.STRIPE_PUBLIC_KEY,
secret.STRIPE_SECRET_KEY,
secret.GITHUB_CLIENT_ID,
secret.GITHUB_CLIENT_SECRET,
secret.HONEYPOT_ENCRYPTION_SEED,
],
})
8 changes: 8 additions & 0 deletions packages/core/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ declare module "sst" {
"sender": string
"type": "sst.aws.Email"
}
"GITHUB_CLIENT_ID": {
"type": "sst.sst.Secret"
"value": string
}
"GITHUB_CLIENT_SECRET": {
"type": "sst.sst.Secret"
"value": string
}
"HONEYPOT_ENCRYPTION_SEED": {
"type": "sst.sst.Secret"
"value": string
Expand Down
8 changes: 8 additions & 0 deletions packages/functions/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ declare module "sst" {
"sender": string
"type": "sst.aws.Email"
}
"GITHUB_CLIENT_ID": {
"type": "sst.sst.Secret"
"value": string
}
"GITHUB_CLIENT_SECRET": {
"type": "sst.sst.Secret"
"value": string
}
"HONEYPOT_ENCRYPTION_SEED": {
"type": "sst.sst.Secret"
"value": string
Expand Down
4 changes: 2 additions & 2 deletions packages/www/app/modules/auth/auth.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ authenticator.use(
authenticator.use(
new GitHubStrategy(
{
clientId: process.env.GITHUB_CLIENT_ID || '',
clientSecret: process.env.GITHUB_CLIENT_SECRET || '',
clientId: Resource.GITHUB_CLIENT_ID.value,
clientSecret: Resource.GITHUB_CLIENT_SECRET.value,
redirectURI: `${process.env.HOST_URL}/auth/github/callback`,
},
async ({ profile }) => {
Expand Down
8 changes: 8 additions & 0 deletions packages/www/sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ declare module "sst" {
"sender": string
"type": "sst.aws.Email"
}
"GITHUB_CLIENT_ID": {
"type": "sst.sst.Secret"
"value": string
}
"GITHUB_CLIENT_SECRET": {
"type": "sst.sst.Secret"
"value": string
}
"HONEYPOT_ENCRYPTION_SEED": {
"type": "sst.sst.Secret"
"value": string
Expand Down
8 changes: 8 additions & 0 deletions sst-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ declare module "sst" {
"sender": string
"type": "sst.aws.Email"
}
"GITHUB_CLIENT_ID": {
"type": "sst.sst.Secret"
"value": string
}
"GITHUB_CLIENT_SECRET": {
"type": "sst.sst.Secret"
"value": string
}
"HONEYPOT_ENCRYPTION_SEED": {
"type": "sst.sst.Secret"
"value": string
Expand Down

0 comments on commit c742e59

Please sign in to comment.