Closed lawmicha closed 2 years ago
Thanks @lawmicha for the RFC! A few initial thoughts:
At first glance, it is straight-forward exercise to add a Button
to an Android application. How will the proposed buttons be differentiated from the platform widgets, and the stylizations they already provide?
I'd guess that consistent look-and-feel across iOS, JavaScript and Android is an explicit goal. Are there UI mockups you could add, to help illustrate the various components being proposed?
In one example, you have a username and password bound to a button object. I'd expect a button to drive an action, to pull data from other form fields, as opposed to owning the data itself. How would a UI button come to know these authentication values, and ought it to, regardless?
My take on authentication:
Closing due to low traction and upvotes.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
This issue is a Request For Comments (RFC). It is intended to elicit community feedback regarding a proposed feature to the Amplify Libraries. Please feel free to post comments or questions here.
The proposed feature is to provide a set of customizable UI components to make it easier to add user management functionality to your app. This will be similar to the JS library in terms of design and feature parity, while with platform dependent differences such as considerations of Google's material design guidelines.
Current
signInWithWebUI
functionality provided by this plugin displays Cognito's HostedUI webpage. The developer can customize this in the Cognito console. The API also supports opens directly to a specific social provider which is useful for creating social provider specific buttons. (link)Use cases
The following are to outline which developer use cases we are looking to address with these UI components.
Proposed solution
The proposal is to provide set of UI components using Jetpack Compose. The first layer are simple UI components. The following are work in progress examples and subject to change based on feedback.
Simple components
SignUpButton
example:AWSCognitoSignInWithFacebookButton
provides a styled Facebook login button that will launch the Cognito HostedUI directly to the facebook login page.Developers can directly interface with the Amplify.Auth APIs or use these simple components to build more complex workflows around them.
Authenticator component
The Authenticator component provides an out-of-the-box authentication flow built using the simple components described above. For example, sensible defaults such as a
ForgotPasswordLink
on the SignIn view, an set of phone number input fields to pass information to the SignUpButton, and other features that can be disabled/enabled based on the auth use case.Alternatives
References
Amplify.Auth.signInWithWebUI
. (link)Questions for the community: