``refactor UserMeta creation and authentication client to improve documentation and type consistency
``
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
'use client';
|
||||
|
||||
// src/lib/auth/custom/client.ts
|
||||
//
|
||||
import { getUserMetaById } from '@/db/UserMetas/GetById';
|
||||
|
||||
import type { User } from '@/types/user';
|
||||
import { logger } from '@/lib/default-logger';
|
||||
import { pb } from '@/lib/pb';
|
||||
import type { User } from '@/types/user';
|
||||
|
||||
function generateToken(): string {
|
||||
const arr = new Uint8Array(12);
|
||||
@@ -11,14 +14,6 @@ function generateToken(): string {
|
||||
return Array.from(arr, (v) => v.toString(16).padStart(2, '0')).join('');
|
||||
}
|
||||
|
||||
const user_xxx = {
|
||||
id: 'USR-000',
|
||||
avatar: '/assets/avatar.png',
|
||||
firstName: 'Sofia',
|
||||
lastName: 'Rivers',
|
||||
email: 'sofia@devias.io',
|
||||
} satisfies User;
|
||||
|
||||
export interface SignUpParams {
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
|
Reference in New Issue
Block a user