You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sequenceDiagram
participant User
participant Client
participant Server
participant Database
participant EmailSystem
User->>Client: Enter email and password
Client->>Server: Send registration request
Server->>Database: Save user, generate token and set expiration
Database-->>Server: User and token saved
Server->>EmailSystem: Send email with verification link
EmailSystem-->>User: Verification email
alt Email verification within expiry time
User->>Client: Click verification link
Client->>Server: Send token for verification
Server->>Database: Validate token and update user
Database-->>Server: User updated
Server->>Client: Verification successful
Client-->>User: Verification successful message
else Email verification after expiry time
User->>Client: Click verification link
Client->>Server: Send token for verification
Server->>Database: Check token expiry
Database-->>Server: Token expired
Server->>Client: Verification failed (token expired)
Client-->>User: Verification failed message
User->>Client: Request for re-registration
Client->>Server: Send re-registration request
Server->>Database: Check unverified user and generate new token
Database-->>Server: New token and expiration created
Server->>EmailSystem: Send new email with verification link
EmailSystem-->>User: New verification email
User->>Client: Click new verification link
Client->>Server: Send new token for verification
Server->>Database: Validate new token and update user
Database-->>Server: User updated
Server->>Client: Verification successful
Client-->>User: Verification successful message
end
Loading
SELECT*FROM email_verification_tokens
WHERE token ='your_token'AND expiration >CURRENT_TIMESTAMP;
sqlx migrate add <name>
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: