Amazon Cognito Hello:
I would like to know if somebody has experience working or integrating Amazon Cognito Service with Laravel in order to authenticate users with Cognito Pools
I couldn't find any package related with that so It would be great read all the experiences from everyone because I will try to develop something to implement that service.
Thanks in advance
I too am interested in any info that people are wiling to share.
Me too.
Has anyone got cognito working via normal php first?
If I try to install pallant/laravel-aws-cognito-auth in Laravel 5.6 I get the next errors... any suggestion?:
- Conclusion: remove symfony/http-foundation v4.0.4
- Conclusion: don't install symfony/http-foundation v4.0.4
- pallant/laravel-aws-cognito-auth v1.1.2 requires symfony/http-foundation ~3.2
@gwilliamtam maybe you can fork the package update the minimum requirement and run the test to check if everything is working
Is a clean copy of Laravel 5.6. Works fine in Laravel 5.5 but doesn't not like Laravel 5.6 requesting symfony/http-foundation 4.0.
I added an issue to the repository.
I used https://github.com/Pod-Point/laravel-cognito-auth instead and after some tuning could make it work. I had to copy their login() into my LoginController to catch some exceptions:
public function login(Request $request)
{
$this->validateLogin($request);
if ($this->hasTooManyLoginAttempts($request)) {
$this->fireLockoutEvent($request);
return $this->sendLockoutResponse($request);
}
try{
if ($this->attemptLogin($request)) {
return $this->sendLoginResponse($request);
}
} catch (CognitoIdentityProviderException $e){
// do something here
return redirect()->route('login')->with(['message'=>$e->getMessage()]);
} catch (\Exception $f){
// or do something else here
return redirect()->route('login')->with(['message'=>$e->getMessage()]);
}
return $this->sendFailedLoginResponse($request);
}
Please sign in or create an account to participate in this conversation.