create-rudder-app 0.9.0 → 0.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,7 +32,7 @@ Skip `[name]` to be prompted for one.
32
32
  With the **default choices** (Prisma + SQLite + Auth + React + Tailwind + shadcn/ui + Contact demo), you get a working fullstack app you can register into, log into, and sign out of — without writing any code:
33
33
 
34
34
  - **Welcome page at `/`** — controller-returned view, Tailwind + shadcn styled, with Log in / Register links or a signed-in user + Sign out button.
35
- - **Auth flow that works** — `/login`, `/register`, `/forgot-password`, `/reset-password` pages vendored into `app/Views/Auth/` (so you can customize them freely) and wired to `POST /api/auth/sign-in/email` / `sign-up/email` / `sign-out` / `request-password-reset` / `reset-password` endpoints.
35
+ - **Auth flow that works** — `/login`, `/register`, `/forgot-password`, `/reset-password` pages vendored into `app/Views/Auth/` (so you can customize them freely) and wired to `POST /auth/sign-in/email` / `sign-up/email` / `sign-out` / `request-password-reset` / `reset-password` endpoints.
36
36
  - **Database ready** — Prisma schema with a `User` + `PasswordResetToken` model, SQLite by default, a `User` ORM model.
37
37
  - **Session-based auth** — cookie sessions via `@rudderjs/session`, `AuthMiddleware` applied to the `web` group, ghost-user-safe (see the [Request Lifecycle guide](https://github.com/rudderjs/rudder/blob/main/docs/guide/lifecycle.md)).
38
38
  - **Rate limiting** — 60 req/min globally, 10 req/min on auth endpoints out of the box.
@@ -8,9 +8,9 @@ export class User extends Model {
8
8
  id!: string
9
9
  name!: string
10
10
  email!: string
11
- password?: string | null
12
- emailVerified!: boolean
13
- role!: string
11
+ password?: string | null
12
+ emailVerifiedAt!: Date | null
13
+ role!: string
14
14
  createdAt!: Date
15
15
  updatedAt!: Date
16
16
  }
@@ -126,7 +126,7 @@ export default function Page() {
126
126
  const [user, setUser] = useState(data.user)
127
127
 
128
128
  async function signOut() {
129
- await fetch('/api/auth/sign-out', {
129
+ await fetch('/auth/sign-out', {
130
130
  method: 'POST',
131
131
  headers: { 'Content-Type': 'application/json' },
132
132
  body: '{}',
@@ -199,7 +199,7 @@ const data = useData<Data>()
199
199
  const user = ref(data.user)
200
200
 
201
201
  async function signOut() {
202
- await fetch('/api/auth/sign-out', {
202
+ await fetch('/auth/sign-out', {
203
203
  method: 'POST',
204
204
  headers: { 'Content-Type': 'application/json' },
205
205
  body: '{}',
@@ -269,7 +269,7 @@ export default function Page() {
269
269
  const [user, setUser] = createSignal(data.user)
270
270
 
271
271
  async function signOut() {
272
- await fetch('/api/auth/sign-out', {
272
+ await fetch('/auth/sign-out', {
273
273
  method: 'POST',
274
274
  headers: { 'Content-Type': 'application/json' },
275
275
  body: '{}',
@@ -4,7 +4,7 @@ export function prismaAuth() {
4
4
  name String
5
5
  email String @unique
6
6
  password String?
7
- emailVerified Boolean @default(false)
7
+ emailVerifiedAt DateTime?
8
8
  image String?
9
9
  role String @default("user")
10
10
  rememberToken String?
@@ -70,7 +70,7 @@ interface Feature {
70
70
  ${WELCOME_FEATURES}
71
71
 
72
72
  export default function Welcome(props: WelcomeProps) {
73
- const signOutUrl = props.signOutUrl ?? '/api/auth/sign-out'
73
+ const signOutUrl = props.signOutUrl ?? '/auth/sign-out'
74
74
  const docsUrl = props.docsUrl ?? DEFAULT_DOCS
75
75
  const githubUrl = props.githubUrl ?? DEFAULT_GITHUB
76
76
 
@@ -191,7 +191,7 @@ interface Feature {
191
191
 
192
192
  ${WELCOME_FEATURES}
193
193
 
194
- const signOutUrl = props.signOutUrl ?? '/api/auth/sign-out'
194
+ const signOutUrl = props.signOutUrl ?? '/auth/sign-out'
195
195
  const docsUrl = props.docsUrl ?? DEFAULT_DOCS
196
196
  const githubUrl = props.githubUrl ?? DEFAULT_GITHUB
197
197
 
@@ -297,7 +297,7 @@ interface Feature {
297
297
  ${WELCOME_FEATURES}
298
298
 
299
299
  export default function Welcome(props: WelcomeProps) {
300
- const signOutUrl = () => props.signOutUrl ?? '/api/auth/sign-out'
300
+ const signOutUrl = () => props.signOutUrl ?? '/auth/sign-out'
301
301
  const docsUrl = () => props.docsUrl ?? DEFAULT_DOCS
302
302
  const githubUrl = () => props.githubUrl ?? DEFAULT_GITHUB
303
303
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rudder-app",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@clack/prompts": "^1.0.0",
30
- "@rudderjs/auth": "4.0.2"
30
+ "@rudderjs/auth": "5.0.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^20.0.0",