Skip to content

Conversation

@janhesters
Copy link
Collaborator

closes #27

@janhesters janhesters self-assigned this Aug 20, 2025
@janhesters janhesters requested a review from ericelliott August 20, 2025 09:23
@ericelliott
Copy link
Collaborator

Functional requirements should be in the PRD (product requirements document) and not be focused on UI, e.g. trigger descriptions "user clicked x".

Instead, focus on user user journey and benefits - what is the user's semantic intent?

Write requirements in "Given $situation, should $expectedBehavior, so that $benefit".

RDD refers to this part:

Separately, API documentation should be focused on interfaces, which in SudoLang look a LOT like TypeScript Schemas. (TypeScript types for complex types).

This part should read like technical documentation teaching users how to use the API. It doesn't need to be crazy thorough, just the minimum to document the API surface. In other words, if there is a schema/interface, that goes in RDD. If there are requirements, that goes in the requirements doc. (Product Requirements Document PRD), etc.

- Ensure seamless onboarding for new users
- Support cross-device authentication scenarios

### Success Metrics
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we get rid of these success metrics? These are just fantasies until we get some baseline measurements.

@@ -0,0 +1,406 @@
# Requirements Definition Document: Authentication Strategy
Copy link
Collaborator

Choose a reason for hiding this comment

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

RDD does not stand for "Requirements Definition Document" 🤣

- **Attestation**: None required (for broader compatibility)

#### Magic Link Security
- **Expiration**: 15 minutes maximum
Copy link
Collaborator

@ericelliott ericelliott Sep 4, 2025

Choose a reason for hiding this comment

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

Magic links can take more than 10-15 minutes to be delivered. This should be hours, not minutes.

#### User Profile Schema
```json
{
"userId": "uuid",
Copy link
Collaborator

Choose a reason for hiding this comment

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

string

### 3.2 Data Storage Requirements

#### User Profile Schema
```json
Copy link
Collaborator

@ericelliott ericelliott Sep 4, 2025

Choose a reason for hiding this comment

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

This should be in sudolang format:

Passkey {
  userId: string                // user PK, also use as user handle bytes. Index on this so we can easily query all passkeys for a specific user.
  credentialId: string          // base64url
  publicKeyCose: string         // base64url COSE key
  signCount: number             // last known counter
}

Passkeys: Passkey[] // This gets its own table in the db

UserProfile {
  userId: string // cuid
  email: string
  createdAt: number // epoch time Date.now()
  // passkeys not needed here because we discover the user from the passkeys table, not vice verse
}

{
"userId": "uuid",
"email": "string",
"emailVerified": "boolean",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not needed. User accounts should not be created until a successful email auth happens, which means all user records should have verified emails because there's no other way to create an account.

@janhesters
Copy link
Collaborator Author

Closed in favor of #44

@janhesters janhesters closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RDD for passwordless auth

3 participants