flask_cognito icon indicating copy to clipboard operation
flask_cognito copied to clipboard

Cognito with API keys

Open ardian-c opened this issue 4 years ago • 1 comments

Hi,

Thank you for this helpful package.

I'm trying to integrate an API that wants to use the same endpoints as the web application does. Currently, with the auth required decorator, these methods expect a certain authentication header to be sent, and that to be valid with Cognito. Is there a way I can bypass the decorator by validating the API key instead of the authentication header?

Thanks

ardian-c avatar Aug 10 '20 11:08 ardian-c

If you're using an API key to provide authenticated access, you wouldn't need Cognito. You can simply store the API key in your database and use a lookup.

Here's some helpful information to create a decorator using an api key:

speedhawk21 avatar Oct 27 '20 22:10 speedhawk21