This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

semble / src / modules / atproto / infrastructure / services / FakeAtpAppPasswordProcessor.ts
825 B 24 lines
1import { ok, Result, err } from 'src/shared/core/Result'; 2import { IAppPasswordProcessor } from '../../application/IAppPasswordProcessor'; 3import { AuthResult } from 'src/modules/user/application/services/IOAuthProcessor'; 4 5export class FakeAtpAppPasswordProcessor implements IAppPasswordProcessor { 6 async processAppPassword( 7 identifier: string, 8 appPassword: string, 9 ): Promise<Result<AuthResult>> { 10 try { 11 // Use mock data from environment variables 12 const mockDid = process.env.BSKY_DID || 'did:plc:mock123'; 13 const mockHandle = process.env.BSKY_HANDLE || 'mock.bsky.social'; 14 15 // Simulate successful authentication with any identifier/password 16 return ok({ 17 did: mockDid, 18 handle: mockHandle, 19 }); 20 } catch (error: any) { 21 return err(error); 22 } 23 } 24}