feat: require bluesky refresh
This commit is contained in:
parent
77bb2b2c71
commit
1c14497855
|
|
@ -6,8 +6,7 @@ import {
|
|||
} from '@gitroom/nestjs-libraries/integrations/social/social.integrations.interface';
|
||||
import { makeId } from '@gitroom/nestjs-libraries/services/make.is';
|
||||
import {
|
||||
NotEnoughScopes,
|
||||
SocialAbstract,
|
||||
NotEnoughScopes, RefreshToken, SocialAbstract
|
||||
} from '@gitroom/nestjs-libraries/integrations/social.abstract';
|
||||
import { BskyAgent, RichText } from '@atproto/api';
|
||||
import dayjs from 'dayjs';
|
||||
|
|
@ -152,10 +151,14 @@ export class BlueskyProvider extends SocialAbstract implements SocialProvider {
|
|||
service: body.service,
|
||||
});
|
||||
|
||||
await agent.login({
|
||||
identifier: body.identifier,
|
||||
password: body.password,
|
||||
});
|
||||
try {
|
||||
await agent.login({
|
||||
identifier: body.identifier,
|
||||
password: body.password,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new RefreshToken('bluesky', JSON.stringify(err), {} as BodyInit);
|
||||
}
|
||||
|
||||
let loadCid = '';
|
||||
let loadUri = '';
|
||||
|
|
|
|||
Loading…
Reference in New Issue