awslabs / cognito-at-edge

Serverless authentication solution to protect your website or Amplify application
Apache License 2.0
168 stars 54 forks source link

Add isAuthenticated to check if user is authenticated #22

Open keokilee opened 2 years ago

keokilee commented 2 years ago

Implementation largely borrows from the handle function, but simply returns true or false instead of doing the work to redirect the user to the appropriate destination.

Issue # (if available): #21

Description of changes: Simply re-uses most of the handle function to return a boolean value instead. Apologies for the formatting issues, can remove if that's a problem.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

danielbayerlein commented 2 years ago

Would love to see the feature.