Open BBopanna opened 2 years ago
@dabit3 @kaustavghosh06 @ErikCH - Any comments on this loss of feature please ?
Hello @BBopanna ,
To answer your questions,
aws-amplify-react
is a deprecated package, which stoped updated since 8 month ago.
@aws-amplify/ui-react is the Amplify UI library (docs) and @aws-amplify/auth is the Amplify JS auth library (docs)
You can customize most of it. Here's the details: https://dev.ui.docs.amplify.aws/react/connected-components/authenticator/customization
Let me know if that answers all your questions. If you have more questions, please feel free to open an issue https://github.com/aws-amplify/amplify-ui/issues
Hi @BBopanna ! Let's chat more about this. Could we jump on a call? Email me at ehhanche @ amazon dot com
Following up on this also. Would like to be able to pass completely custom components like we used to
Thankyou @0618 - that answers the question about the difference about the 3 packages. "You can customize most of it" - most is not all of it. In fact there is very little customisation possible at all IMHO.
export declare function Authenticator(props: AuthenticatorProps): JSX.Element;
export declare type AuthenticatorProps = Partial<AuthenticatorMachineOptions & ComponentsProviderProps & RouterProps & {
children: React.ReactNode | ((props: {
signOut?: UseAuthenticator['signOut'];
user?: CognitoUserAmplify;
}) => JSX.Element);
}>;
export interface ComponentsProviderProps {
components?: DefaultComponents;
}
interface Components {
Footer?: () => JSX.Element;
FormFields?: () => JSX.Element;
Header?: () => JSX.Element;
}
export interface DefaultComponents extends Omit<Components, 'FormFields'> {
ConfirmSignIn?: Omit<Components, 'FormFields'>;
ConfirmSignUp?: Omit<Components, 'FormFields'>;
ConfirmResetPassword?: Omit<Components, 'FormFields'>;
ConfirmVerifyUser?: Omit<Components, 'FormFields'>;
ForceNewPassword?: Pick<Components, 'FormFields'>;
ResetPassword?: Omit<Components, 'FormFields'>;
SetupTOTP?: Omit<Components, 'FormFields'>;
SignIn?: Omit<Components, 'FormFields'>;
SignUp?: Components;
VerifyUser?: Omit<Components, 'FormFields'>;
}
In here the only provision for the DefaultComponents is to pass Header, Footer and FormFields, and in most cases, except SignUp, Formfields is Omitted - so only Header and Footer can be passed for customisation.
We have fully customized Authentication pages like below which we cannot migrate with the limited customization offered by @aws-amplify/ui-react.
thankyou @ErikCH - emailed, please check.
This is an issue that we are facing as well, and are in the process of reverting to the older legacy Amplify components to implement better customization (particularly displaying interactive password requirements linked to the actual password field in reset/signup forms)
@BBopanna A new prop for overriding full components similar to the legacy Authenticator
will be made available. Do not have a definitive date for release at this time but wanted to update you. Thanks for your feedback!
@calebpollman - thank you for letting us know, we will look forward eagerly for an update on the release of this feature.
@calebpollman Any update on when it will be possible to override components? Thanks.
@ErikCH - Its been quite some time, can you please post an update on this issue ?
Any update on this @calebpollman @ErikCH ? This has become a major blocker while trying to upgrade the package.
Hi @xamogh ! We are working on it! We have implemented it in react-native, as you can see from here. We are calling it Subcomponent override slots -> https://ui.docs.amplify.aws/react-native/connected-components/authenticator/customization#subcomponent-override-slots
cc @wlee221
Anything on this? Why can't we pass custom components?
Hi, any update on this please, @calebpollman @ErikCH ? This has become a major blocker
while trying to upgrade to react 18.0 and react-scripts 5.0.1, because they only support the latest aws-amplify/ui-react and the deprecated legacy libraries don't work with react-18.
Please can we have a response soon 🙏
@livingstonex @cjsilva-umich Supporting full customization for the Authenticator
is currently in active development but cannot give a specific target date for release.
Ok, thank you @calebpollman, I'll keep an eye out for this.
How can this behavior even be achieved in the meantime? Is the only way to have control over the look and behavior of the sign-in screen to completely create a custom auth solution?
Is there a work around this? I'm looking to customize the confirm sign up UI (I turned off the auto verification). Instead of asking for the confirmation code, I would like to have the sign up page display "You've signed up! We will get back to you shortly". They only thing we were able to customize was the header and footer which was not helpful.
Any updates on this?
So I guess it's still not possible to pass own components like input fields to the authenticator one?
I need to create a login page like this. Please suggest how it can be achieved. If i pass custom header and footer it loads within the container.
Hi @madan712 Can you please elaborate on your ask?
+1
Any update?
I found a workaround in my case. Use CSS to hide the Form Fields section and implement the rest in your header or footer. here is the css I used
form[data-amplify-authenticator-confirmsignup] .amplify-authenticator__subtitle,
form[data-amplify-authenticator-confirmsignup] .amplify-textfield,
form[data-amplify-authenticator-confirmsignup]
> fieldset
> div
> .amplify-button[type='submit'],
form[data-amplify-authenticator-confirmsignup]
> fieldset
> div
> .amplify-button[type='button'] {
display: none !important;
Then you can use for example the footer section like this:
const components = {
ConfirmSignUp: {
Footer() {
const { toSignIn } = useAuthenticator();
return (
<>
<Text>{I18n.get('REGISTER_CONFIRM_EMAIL_LABEL')}</Text>
<Button onClick={toSignIn}>Back to SignIn</Button>
</>
);
}
}
};
@calebpollman
@livingstonex @cjsilva-umich Supporting full customization for the
Authenticator
is currently in active development but cannot give a specific target date for release.
Is there any timetable for this at all? This is a big problem for us. For now we are still stuck on deprecated aws-amplify-react and we really would like to upgrade. And this feature has been under work for over 2 years already.
@jukkahuuskonen thank you for following up on this feature request. Supporting full customization for the Authenticator
is on our roadmap, but no timeline is currently available.
@jukkahuuskonen thank you for following up on this feature request. Supporting full customization for the
Authenticator
is on our roadmap, but no timeline is currently available.
The old library, aws-amplify-react, which had this feature has been deprecated for over 2 years (at least last version of it was then) and still you don't have a replacement for it or even a timetable for implementing it. Please try to get this feature done soon.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
Newer @aws-amplify/ui-react component does not have option to pass fully customized SignIn, SignUp and other auth components
There are 3 packages around authentication -
Why do these 3 packages exist if all solve the authentication flows ? When should one be used over other - can not find the answers in the documentation. SO Link says this (NOT SURE IF THIS IS RIGHT) - "It looks like aws-amplify-react is the legacy package name and it was changed to @aws-amplify/ui-react in the current version."
Now coming to the issue - we wanted to use @aws-amplify/ui-react but cannot pass fully customized SignIn, Signup and other components - We can only customize the header, footer and formFields . aws-amplify-react supports this , see here
Since aws-amplify-react does not seem to have a lot of activity and is moved under legacy directory (here)and @aws-amplify/ui-react has, which seems the later version as the SO link say, we wanted to use it and pass our own custom components which does not seem possible - is this a loss off feature ?
Expected behavior
@aws-amplify/ui-react should provide option to pass fully customized SignIn, SignUp and other components and not just header, footer and formfields.
Reproduction steps
NA
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
Deduplicated from https://github.com/aws-amplify/amplify-ui/issues/1995
Please describe your bug.
ResetPassword
customization isn't fully working. Customization of theHeader()
is fine but a customFooter()
shows up along with the original footer. For example, I am trying to render my ownLink
component in theResetPassword
component but it shows up along with the originalFooter
. Similar to issue reported here 👉🏽 #1256What's the expected behaviour?
The footer should be replaced by the custom component.
Help us reproduce the bug!
Bug can be reproduced in 2.18.2 and 2.18.3. Here's the reproduction with 2.18.2
https://codesandbox.io/s/amplify-customization-issue-forked-4cqxcv
Code Snippet
Additional information and screenshots