Subscribe to PHP Freaks RSS

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

syndicated from www.phpdeveloper.org on December 11, 2017

On his site today Gonzalo Ayuso has a tutorial posted showing how to create authentication in OpenUI5 applications with the help of Lumen, Amazon Cognito and JWTs.

Today I want to create an UI5/OpenUI5 boilerplate that plays with Lumen backends. Simple, isn’t it? We only need to create a Lumen API server and connect our OpenUI5 application with this API server. But today I also want to create a Login also. The typical user/password input form. I don’t want to build it from scratch (a user database, oauth provider or something like that). Since this days I’m involved with Amazon AWS projects I want to try Amazon Cognito.

He then walks through the Cognito service and what it has to offer including user management and authentication handling. He starts with the OpenUI5 side, creating the basic application and login handling via the Congnito Javascript SDK. He then modifies this with some basic user handling and creates the view for the login form. He also includes functionality for password resets and the code required to inject the JWT into every request post-authentication.