amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Unified Web-Based Authentication for Multi-Platform Applications with a Custom UI

Open lilyreadmoo opened this issue 5 months ago • 5 comments

Is this related to a new or existing framework?

Next.js

Is this related to a new or existing API?

Authentication

Is this related to another service?

No response

Describe the feature you'd like to request

I'm currently using Gen2 Auth to build a custom sign-in/sign-up page with Next.js. As I work toward creating a consistent authentication experience across multiple platforms (Android, iOS, Desktop), I find that using Amplify libraries natively on each platform leads to fragmented codebases and duplicated effort.

I’d like to propose support for a unified, web-based authentication experience—one where developers can build a single, fully custom authentication page (e.g., with Next.js) and use it as the entry point across all platforms.

The key idea is to enable native and desktop applications to securely open this custom web page for login and then receive the authentication tokens (access, ID, and refresh tokens) upon successful sign-in. This would streamline development and ensure a consistent user experience across all platforms.

Describe the solution you'd like

I’m looking for a solution that enables developers to use a single, custom Next.js sign-in/sign-up interface across Android, iOS, and Desktop platforms, ensuring consistent branding and reducing development effort.

The ideal workflow would be:

  1. A user on a native Android / iOS / Desktop app clicks "Sign In."

  2. The app opens a secure web view that directs to my custom Next.js authentication page.

  3. The user signs in or signs up using the web interface, which calls the standard SignIn(), SignUp() methods, including the signInWithRedirect API.

  4. Upon successful authentication, Amplify would facilitate a secure hand-off of the session tokens back to the calling native application, or like the Managed Login can deliver an OAuth code

This would give developers the flexibility of a custom UI with the benefits of centralized, consistent authentication logic.

Note: I’m aware of the Cognito Hosted UI and Managed Login, but these options don’t allow the full UI/UX customization we require—hence the need for this more flexible solution.

Describe alternatives you've considered

As I mentioned above. 🙏 custom UI in web, and it can grant an authorization code (similar to the standard OAuth flow) to a native app

Additional context

No response

Is this something that you'd be interested in working on?

  • [ ] 👋 I may be able to implement this feature request
  • [ ] ⚠️ This feature might incur a breaking change

lilyreadmoo avatar Jul 15 '25 02:07 lilyreadmoo

Hey @lilyreadmoo, thanks for creating this issue! Does the solution proposed for this issue satisfy this use case?

pranavosu avatar Jul 15 '25 14:07 pranavosu

Hey @lilyreadmoo, thanks for creating this issue! Does the solution proposed for this issue satisfy this use case?

Hi @pranavosu, thank you for your response!

The issue you linked is related to the signInWithRedirect feature, which is a bit different from what I’m asking.

I’m looking for a way to sign in like Cognito Managed Login (hosted UI), but with a custom UI that we build ourselves

lilyreadmoo avatar Jul 16 '25 02:07 lilyreadmoo

@lilyreadmoo, got it. i think this is definitely something we'll look into implementing. in the meantime, let us know if you have any other thoughts about this!

pranavosu avatar Jul 18 '25 06:07 pranavosu

Those issues are the same idea of feature-request as me. #6236 #6434

lilyreadmoo avatar Nov 18 '25 06:11 lilyreadmoo

Hey @lilyreadmoo, thank you for pointint out these issues. We are still looking into this, and will let you know once we have any updates.

ahmedhamouda78 avatar Nov 18 '25 14:11 ahmedhamouda78