-
-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use CustomTabs instead of WebView for login #4973
base: master
Are you sure you want to change the base?
Use CustomTabs instead of WebView for login #4973
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Thanks for the suggestion, but your description feels very generic and also not always correct (WebView is updated the same way as a browser). This breaks our unofficial support for cookie/redirects during the login because it is now happening outside the WebView and not available after logging in 🤔. I wonder if that's worth the benefit - Home Assistant is not 100% like normal OAuth. |
Thanks for the reply. So, I understand your reasoning, and it is appropriate to proceed as you deem most appropriate. |
How would switching to custom tabs for login help here, as you can now login but the main UI is still using WebView and won't be able to load? The main UI won't switch because of customizations/native integration? |
Main UI seems to work, I think login page is not working for background animations. |
Summary
This PR implements Custom Tabs instead of WebView for login.
Using Custom Tabs instead of WebView offers several advantages:
Performance and Speed: Custom Tabs leverage the user's preferred browser, which is optimized for performance and speed. This results in faster loading times compared to WebView.
Security: Custom Tabs inherit the security features of the browser, including safe browsing, sandboxing, and other security measures. WebView, on the other hand, requires additional handling to ensure security.
User Experience: Custom Tabs provide a seamless user experience by allowing users to stay within the app while browsing. They support features like saved passwords, autofill, and payment methods, which are not available in WebView.
Maintenance: Using Custom Tabs reduces the maintenance overhead as they automatically update with the browser. WebView requires manual updates and handling of web content rendering.
By integrating Custom Tabs, we can enhance the app's performance, security, and user experience while reducing maintenance efforts.
Consider also this article
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes