In an app I am trying to have separate buttons to link to the sign up and sign in pages respectively of an Amazon Cognito User Pools' Hosted UI but so far I can only link to the sign in page.
I am using the AWS Amplify Package from npm and my code may look somehow like the following:
import { Auth } from "aws-amplify";
//...
function openSignIn() {
Auth.federatedSignIn();
}
function openSignUp() {
// ???
}
I have found no federatedSignUp()
or a function that would accept options regarding it.
The url of the sign up page is:
<domain>/signup?redirect_uri=<redirect_uri>&response_type=<response_typ>&client_id=<client_id>&identity_provider=<identity_provider>&scopes=<scopes>&state=<state>
and while I know all parameters' values I don't know the value of the state
param which makes it difficult to use it immediately in an anchor tag even though I don't like this solution.
Is there a proper/elegant solution at all?