{"id":5845,"date":"2024-04-26T10:08:55","date_gmt":"2024-04-26T07:08:55","guid":{"rendered":"https:\/\/unitycoder.com\/blog\/?p=5845"},"modified":"2024-05-16T10:38:23","modified_gmt":"2024-05-16T07:38:23","slug":"unityhub-enable-builtin-login-dialog-no-more-browser-login-logout-issues","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2024\/04\/26\/unityhub-enable-builtin-login-dialog-no-more-browser-login-logout-issues\/","title":{"rendered":"UnityHub: Enable built-in Login Dialog (no more browser login\/logout issues!)"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"680\" height=\"660\" data-attachment-id=\"5846\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2024\/04\/26\/unityhub-enable-builtin-login-dialog-no-more-browser-login-logout-issues\/image-1-18\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?fit=680%2C660&amp;ssl=1\" data-orig-size=\"680,660\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?fit=680%2C660&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?resize=680%2C660&#038;ssl=1\" alt=\"\" class=\"wp-image-5846\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?resize=300%2C291&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/figure>\n\n\n\n<p>Just noticed that Unity Hub has builtin login dialog system hidden inside!<\/p>\n\n\n\n<p><strong>Steps<\/strong><br>&#8211; Unpack your app.asar, see info <a href=\"https:\/\/github.com\/unitycoder\/UnityHubModding\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/unitycoder\/UnityHubModding<\/a><br>&#8211; Open Unity Hub\\resources\\app\\build\\main\\services\\authService\\AuthService.js<br>\/\/ Find line<br><code>if ((0, appDefaultProtocolClientHelpers_1.isUnityHubProtocolHandled)()) {<\/code><br>\/\/ replace with (to make this &#8220;if&#8221; be false, so that createLoginWindow gets called instead)<br><code>if (1==0 &amp;&amp; (0, appDefaultProtocolClientHelpers_1.isUnityHubProtocolHandled)()) {<\/code><\/p>\n\n\n\n<p><strong>Alternative way:<\/strong><br>&#8211; If you cannot or don&#8217;t want to modify Unity Hub source, you need to delete\/disable UnityHub: protocol from Registry Editor (then built-in sign in dialog will be used) *but this might have other side effects..<\/p>\n\n\n\n<p><strong>Link:<\/strong><br><a href=\"https:\/\/github.com\/unitycoder\/UnityHubModding\/tree\/main#enable-buildin-login-dialog-no-more-browser-loginlogout-issues-with-multiple-accounts\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/unitycoder\/UnityHubModding\/tree\/main#enable-buildin-login-dialog-no-more-browser-loginlogout-issues-with-multiple-accounts<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just noticed that Unity Hub has builtin login dialog system hidden inside! Steps&#8211; Unpack your app.asar, see info https:\/\/github.com\/unitycoder\/UnityHubModding&#8211; Open Unity Hub\\resources\\app\\build\\main\\services\\authService\\AuthService.js\/\/ Find lineif ((0, appDefaultProtocolClientHelpers_1.isUnityHubProtocolHandled)()) {\/\/ replace with (to make this &#8220;if&#8221; be false, so that createLoginWindow gets called instead)if (1==0 &amp;&amp; (0, appDefaultProtocolClientHelpers_1.isUnityHubProtocolHandled)()) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5846,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1267],"tags":[1236,1288,1277,1268],"class_list":["post-5845","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-unityhub","tag-hub","tag-login","tag-modding","tag-unityhub"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2024\/04\/image-1.png?fit=680%2C660&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-1wh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5845","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=5845"}],"version-history":[{"count":6,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5845\/revisions"}],"predecessor-version":[{"id":5857,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/5845\/revisions\/5857"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/5846"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=5845"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=5845"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=5845"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}