MCPcopy
hub / github.com/tsedio/tsed / FacebookProtocol

Class FacebookProtocol

docs/tutorials/snippets/passport/FacebookProtocol.ts:18–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 }
17})
18export class FacebookProtocol implements OnVerify, OnInstall {
19 @Inject()
20 private authService: AuthService;
21
22 async $onVerify(@Req() req: Req, @Args() [accessToken, refreshToken, profile]: any) {
23 profile.refreshToken = refreshToken;
24
25 const user = await this.authService.findOne({facebookId: profile.id});
26
27 return user ? user : false;
28 }
29}

Callers

nothing calls this directly

Calls 1

InjectFunction · 0.90

Tested by

no test coverage detected