I'm writing to propose a significant enhancement to the user login experience: updating the current Google Login handler to use Google's new Google Identity Services (GSI) library.
The Current Situation
Currently, the Google Login handler uses the traditional OAuth 2.0 redirect flow. When a user clicks "Sign in with Google," they are redirected away from the current page to Google, and then redirected back to a callback URL. While functional, this approach has two main drawbacks:
Dated User Experience: The full-page redirect feels disruptive compared to the seamless, pop-up based login experience common in modern web applications.
Caching Complexities: This flow is difficult to implement on sites that use aggressive full-page caching for guests (e.g., via Varnish or CloudFront). The server-side session initiation required before the redirect conflicts with serving a static cached page, forcing developers to choose between performance and a seamless login UX.
The Proposed Solution: Google Identity Services (GSI)
Google has deprecated the old platform library in favor of the new GSI library, which offers a vastly superior user experience. Its key features include:
Personalized Button: The ability to render a button that says "Continue as [Name]" along with the user's profile picture.
One Tap Login: A streamlined, "zero-click" login prompt for returning users.
No Page Redirect: The entire flow happens within a pop-up, and the result (a secure JWT ID Token) is passed directly to a JavaScript callback function, not via a URL redirect.
To properly support this modern flow, we would need two things from the core Invision Community software:
Frontend Support: A native way within the theme system to render the new GSI button, configured to use a JavaScript callback function.
Backend Endpoint: A dedicated, secure backend controller designed to: a. Receive the JWT ID Token from the frontend JavaScript. b. Validate the token against Google's public keys. c. Find or create a member based on the email from the validated token. d. Securely create a new session for that member.
Why This is a Valuable Upgrade for IC5
Modernizes the Platform: It brings the login experience up to the standard set by leading web platforms, enhancing the perceived quality of IC5.
Boosts User Conversion: A seamless, trusted, and personalized login reduces friction, which can directly improve user registration and engagement rates.
Solves Caching Issues: By decoupling the login process from the server-side render, it becomes fully compatible with advanced caching strategies, allowing high-traffic sites to achieve maximum performance without sacrificing the user experience.
This would be a fantastic evolution for the platform, resolving both UX and technical challenges in one go.
Thank you for your time and for considering this important enhancement.
I'm writing to propose a significant enhancement to the user login experience: updating the current Google Login handler to use Google's new Google Identity Services (GSI) library.
The Current Situation
Currently, the Google Login handler uses the traditional OAuth 2.0 redirect flow. When a user clicks "Sign in with Google," they are redirected away from the current page to Google, and then redirected back to a callback URL. While functional, this approach has two main drawbacks:
Dated User Experience: The full-page redirect feels disruptive compared to the seamless, pop-up based login experience common in modern web applications.
Caching Complexities: This flow is difficult to implement on sites that use aggressive full-page caching for guests (e.g., via Varnish or CloudFront). The server-side session initiation required before the redirect conflicts with serving a static cached page, forcing developers to choose between performance and a seamless login UX.
The Proposed Solution: Google Identity Services (GSI)
Google has deprecated the old platform library in favor of the new GSI library, which offers a vastly superior user experience. Its key features include:
Personalized Button: The ability to render a button that says "Continue as [Name]" along with the user's profile picture.
One Tap Login: A streamlined, "zero-click" login prompt for returning users.
No Page Redirect: The entire flow happens within a pop-up, and the result (a secure JWT ID Token) is passed directly to a JavaScript callback function, not via a URL redirect.
You can see the experience here: Google Identity Services - Sign In With Google
The Technical Request
To properly support this modern flow, we would need two things from the core Invision Community software:
Frontend Support: A native way within the theme system to render the new GSI button, configured to use a JavaScript callback function.
Backend Endpoint: A dedicated, secure backend controller designed to: a. Receive the JWT ID Token from the frontend JavaScript. b. Validate the token against Google's public keys. c. Find or create a member based on the email from the validated token. d. Securely create a new session for that member.
Why This is a Valuable Upgrade for IC5
Modernizes the Platform: It brings the login experience up to the standard set by leading web platforms, enhancing the perceived quality of IC5.
Boosts User Conversion: A seamless, trusted, and personalized login reduces friction, which can directly improve user registration and engagement rates.
Solves Caching Issues: By decoupling the login process from the server-side render, it becomes fully compatible with advanced caching strategies, allowing high-traffic sites to achieve maximum performance without sacrificing the user experience.
This would be a fantastic evolution for the platform, resolving both UX and technical challenges in one go.
Thank you for your time and for considering this important enhancement.
Länk till full forum post