Laravel AT Protocol Client (alpha & unstable)
3
fork

Configure Feed

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

Dispatch UserAuthenticated event after OAuth callback

+6 -1
+6 -1
src/Auth/OAuthEngine.php
··· 6 6 use SocialDept\AtpClient\Data\AccessToken; 7 7 use SocialDept\AtpClient\Data\AuthorizationRequest; 8 8 use SocialDept\AtpClient\Data\DPoPKey; 9 + use SocialDept\AtpClient\Events\UserAuthenticated; 9 10 use SocialDept\AtpClient\Exceptions\AuthenticationException; 10 11 use SocialDept\AtpClient\Http\DPoPClient; 11 12 use SocialDept\AtpResolver\Facades\Resolver; ··· 98 99 throw new AuthenticationException('Token exchange failed: '.$response->body()); 99 100 } 100 101 101 - return AccessToken::fromResponse($response->json(), $request->handle, $request->pdsEndpoint); 102 + $token = AccessToken::fromResponse($response->json(), $request->handle, $request->pdsEndpoint); 103 + 104 + event(new UserAuthenticated($token)); 105 + 106 + return $token; 102 107 } 103 108 104 109 /**