spring boot web app for authentication/autorization using AWS Cognito Java API

praveen :

AWS Cognito primarly meant for Serverless user authentication from Mobile or Web application (Javascript).

The primary concern is that, we need to do client implementation for each of the client like Android, IOS and Javascript.

Instead of that can we have spring boot server which will expose a login/signup/action rest endpoint for all the above clients where the spring boot will authenticate/signup with Congnito on behalf of the clients and send the access_token response back to the client. This way, Conginto integration will be done only in one place which is the Spring boot application.

Can we go ahead with this approach? Does AWS SDK supports Java for cognito access from Server?

Ganesh Swamypillai :

Here's an article which shows an example of implementing a Spring boot application that is able to authenticate the user against Amazon Cognito using OAuth 2.0 authorization code grant and JSON Web Tokens.

This github repo contains the example code in Kotlin

Probably, this is in some ways, similar to your usecase.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=96042&siteId=1