loading...

re: How to Easily Customize The AWS Amplify Authentication UI VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Hi Kyle, Was there some reason to not use the withAuthenticator()? As far as I understood from reading the docs, you can pass customized component...
 

Great question! I didn't use withAuthenticator because I always wanted to use hide=[] to hide a lot of the default Amplify screens that I didn't need.

 

Ok, have to look into that myself a bit more. Great article and helped me a lot :)

 

Kyle wrote:

'because I always wanted to use hide=[] to hide a lot of the default Amplify screens that I didn't need.'

Isn't that what the TRUE/FALSE tag in withAuthenticator is used for?

Set it to TRUE (hide=[NONE]) and all AWS-components are shown.

Set it to FALSE (hide=[ALL]) like this and add your custom component(s) into an array:

export default withAuthenticator(App, false, [<YOURCUSTOMSIGNIN />]);

And only component is shown (and all the other custom components in the list). Of course you can also add standard AWS-components to the list there.

No the true/false for the HOC is for showing greetings. You could probably get this setup to work with the HOC but I preferred to go this route in the event I have further customization I need to make.

Ahh, thanks. Couldn't find that in docs, so jumped to a coclusions, since it seemed to work that way (I just wanted the Greeting away and thought it did it to other components too...)

code of conduct - report abuse