Make own api as Third party with AWS cognito

Viewed 464

As we know AWS cognito service provides user management service And we also familier with shopify(the ecommerce store) that provides you it's apis to develop your ecommerce site by sending Auth key and Secret key in headers and it's remain same until i deliberately delete the app. So my question is that how i can do generate the same Auth Key and Secret Key in AWS.I have read many documentations regarding this issue but cant find solution to my problem.

1 Answers

You can use the Client Credentials flow in OAuth2 with Cognito UserPools. This allows creating a clientID and clientSecret (Similar to Auth Key and Secret Key) which could be exchanged with Cognito Token Endpoint for Access Token.

Then you can use the Access Token to request for resources in the header and verify it at your API before responding.

Check the article Server to Server Auth with Amazon Cognito for more info.

Related