Description
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:
-
A user on a native Android / iOS / Desktop app clicks "Sign In."
-
The app opens a secure web view that directs to my custom Next.js authentication page.
-
The user signs in or signs up using the web interface, which calls the standard SignIn(), SignUp() methods, including the signInWithRedirect API.
-
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