Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
31 changes: 31 additions & 0 deletions apps/blog-next/server/notifications/auth/email-verification.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineNotification } from '@holo-js/notifications'

interface EmailVerificationNotification {
readonly email: string
readonly name?: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.email-verification',
via() {
return ['email']
},
build: {
email(data: EmailVerificationNotification) {
return {
subject: 'Verify your email address',
greeting: data.name ? `Hello ${data.name},` : undefined,
lines: [
'Confirm your account to finish signing in.',
`This verification link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Verify email address',
url: data.url,
},
}
},
},
})
29 changes: 29 additions & 0 deletions apps/blog-next/server/notifications/auth/password-reset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineNotification } from '@holo-js/notifications'

interface PasswordResetNotification {
readonly email: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.password-reset',
via() {
return ['email']
},
build: {
email(data: PasswordResetNotification) {
return {
subject: 'Reset your password',
lines: [
'Click the link below to choose a new password.',
`This reset link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Reset password',
url: data.url,
},
}
},
},
})
31 changes: 31 additions & 0 deletions apps/blog-nuxt/server/notifications/auth/email-verification.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineNotification } from '@holo-js/notifications'

interface EmailVerificationNotification {
readonly email: string
readonly name?: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.email-verification',
via() {
return ['email']
},
build: {
email(data: EmailVerificationNotification) {
return {
subject: 'Verify your email address',
greeting: data.name ? `Hello ${data.name},` : undefined,
lines: [
'Confirm your account to finish signing in.',
`This verification link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Verify email address',
url: data.url,
},
}
},
},
})
29 changes: 29 additions & 0 deletions apps/blog-nuxt/server/notifications/auth/password-reset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineNotification } from '@holo-js/notifications'

interface PasswordResetNotification {
readonly email: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.password-reset',
via() {
return ['email']
},
build: {
email(data: PasswordResetNotification) {
return {
subject: 'Reset your password',
lines: [
'Click the link below to choose a new password.',
`This reset link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Reset password',
url: data.url,
},
}
},
},
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { defineNotification } from '@holo-js/notifications'

interface EmailVerificationNotification {
readonly email: string
readonly name?: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.email-verification',
via() {
return ['email']
},
build: {
email(data: EmailVerificationNotification) {
return {
subject: 'Verify your email address',
greeting: data.name ? `Hello ${data.name},` : undefined,
lines: [
'Confirm your account to finish signing in.',
`This verification link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Verify email address',
url: data.url,
},
}
},
},
})
29 changes: 29 additions & 0 deletions apps/blog-sveltekit/server/notifications/auth/password-reset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { defineNotification } from '@holo-js/notifications'

interface PasswordResetNotification {
readonly email: string
readonly url: string
readonly expiresAt: Date
}

export default defineNotification({
type: 'auth.password-reset',
via() {
return ['email']
},
build: {
email(data: PasswordResetNotification) {
return {
subject: 'Reset your password',
lines: [
'Click the link below to choose a new password.',
`This reset link expires at ${data.expiresAt.toUTCString()}.`,
],
action: {
label: 'Reset password',
url: data.url,
},
}
},
},
})
Loading