The Flowise Chat Embed now uses popup windows for OAuth authentication with a centralized callback server, providing a better user experience and easier deployment.
Instead of requiring each website to host its own OAuth callback page, Flowise uses a centralized callback server that handles OAuth callbacks for all embedded chatbot instances.
- Single OAuth Configuration: Configure your OAuth provider once with a single callback URL
- Easier Deployment: No need to host callback pages on each website
- Consistent Security: Centralized security updates and monitoring
- Cross-Domain Support: Works across different domains and subdomains
Development:
cd callback-server
npm install
npm start
# Server runs on http://localhost:3001Production: Deploy the callback-server folder to your hosting platform
Add the centralized callback URL to your OAuth provider:
- Development:
http://localhost:3001/oauth-callback.html - Production:
https://your-callback-server.com/oauth-callback.html
The chatbot automatically uses the centralized callback server based on your environment.
- Better UX: Users stay on your page while authenticating in a popup
- Automatic Handling: Popup opens, handles OAuth flow, and closes automatically
- Secure Communication: Uses
postMessagefor secure parent-popup communication - Error Handling: Gracefully handles popup blocking and authentication errors
Authorized redirect URIs:
- https://your-callback-server.com/oauth-callback.html
- http://localhost:3001/oauth-callback.html (for development)
Redirect URIs (Single-page application):
- https://your-callback-server.com/oauth-callback.html
- http://localhost:3001/oauth-callback.html (for development)
Important: Configure as "Single-page application" in Azure AD app registration
Authority URL format: https://login.microsoftonline.com/{tenant-id}/v2.0
Allowed Callback URLs:
- https://your-callback-server.com/oauth-callback.html
- http://localhost:3001/oauth-callback.html (for development)
- Users will see an error message asking to allow popups
- Add your domain to browser's popup exception list
- Authentication will work normally after allowing popups
- Ensure popup callback URL is added to your OAuth provider
- Check that the callback URL exactly matches what's configured
- Verify OAuth client ID and authority URL are correct
- Make sure callback server is running on
http://localhost:3001 - Make sure debug server is running on
http://localhost:51914 - Check browser console for any JavaScript errors
- Verify
/oauth-callback.htmlis accessible athttp://localhost:3001/oauth-callback.html
- Ensure app is configured as "Single-page application" in Azure AD
- Use authority URL format:
https://login.microsoftonline.com/{tenant-id}/v2.0 - Token exchange must happen from browser (automatic in current implementation)
- Start the callback server:
cd callback-server && npm start - Start the debug server:
yarn debug - Open
http://localhost:51914/examples/ - Click "Sign In" - popup should open to callback server
- Complete OAuth flow in popup
- Popup should close and you should be authenticated
The popup authentication provides a seamless experience while maintaining all the security benefits of OAuth/OIDC authentication.