aws-amplify / aws-amplify/docs
Improve Documentation for Amplify to trigger CUP OAuth2 flows for federated users
- Dominant language
- MDX
- Stars
- 506
- Forks
- 1.1k
- Avg merge
- 3h 14m
- Merged PRs (30d)
- 1
Description
Request for documentation: How to use Amplify to trigger CUP OAuth2 flows for federated users.
The only related page is -> https://docs.amplify.aws/lib/auth/advanced/q/platform/js/
This page can be confusing:
* It brings in concept of Identity Pools federation - that is not relevant for a plain vanilla CUP customer,
* It talks about Google, Facbeook, social federation and tokens etc that are not relevant for a customer just wanting to send a user to CUP Oauth2 endpoints with PKCE.
This should contain a single page dedicated to this simple use-case. Folks can get confused by all the code here, give up and go looking for a PKCE library, or try to hand craft the OAuth2 redirect without PKCE.
The reality is that you just need maybe three lines of code:
document.getElementById("OAuthSignInButtonGoogle").addEventListener("click", (evt) => {
Auth.federatedSignIn({provider: 'Google'});
});
Further, the doc of the actual method of Auth is misleading:
https://aws-amplify.github.io/amplify-js/api/classes/authclass.html#federatedsignin
The signature talks of "LegacyProvider" - just by the name this sounds like something customers should not use. Please add text here to clarify what this is. The value can be google | string. Clarify what the string is = name of IdP in CUP.
Contributor guide
Assessment
This issue has not been assessed yet.