Preferably one with:
1) Start from create-react-app, user react-router to create the pages. Check this base code in so that the later code can be diffed against it.
2) Unprotected home page
3) Login button that displays page with login dialog
4) After successful login a protected page becomes accessible. Login button turns into Logout.
5) On logout the protected UI disappears.
6) Persistent logins for User Pool, Google, FB. ie if I start the app with a persistent login I go directly into the protected UI with Logout button enabled.
7) Show proper technique for exposing unprotected and protected pages via Cloudfront under single domain using Cognito based authorization.
8) Show how to add a protected API into the same, single domain.
9) Show how to create an admin (or privileged user)
10) Show how to do proper security logging.
Using AWS is like walking into Home Depot and saying "I want to build a house". It can be done, but a huge amount of knowledge is required to finish the job. Example frameworks make this task much easier.
@jonsmirl have you checked out the react-sample app? This has mostly been migrated to use Amplify at this point. Let me know if this has the features you are looking for, either way we should probably move this over to there. I think the only thing it does not have is
specially for react (not react-native) and please add social integration for federated authentication?
@jatazoulja I've added this to our backlog
Federated auth is already part of our implementation. Please have a look at: Authentication Guide, section "Federated Identities (Social Sign-in)"
Also, maybe this step by step sample can help in some way for other requests.
@jonsmirl @jatazoulja - We have updated our react-sample with an authentication component which includes federated signin. Hope that helps!
馃憤
Most helpful comment
specially for react (not react-native) and please add social integration for federated authentication?