# The login window in a WKWebView on macOS is sometimes broken

**URL:** <https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048>\
**Category:** Get Help\
**Created:** [April 14, 2020, 5:06pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048 "2020-04-14T17:06:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![markus.kirschner](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markus.kirschner/32/20493_2.png) [@markus.kirschner](https://community.auth0.com/u/markus.kirschner)\
**Post date:** [April 14, 2020, 5:06pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/1 "2020-04-14T17:06:30Z")

</div>

I am showing the login window in a native desktop app on macOS Catalina in a WKWebView with an URL in the following form:

[https://XXX.eu.auth0.com/authorize?response\_type=code&code\_challenge=YYYY&code\_challenge\_method=S256&client\_id=ZZZ&redirect\_uri=XXX&audience=YYY&state=ZZZ&scope=openid+email+profile](https://XXX.eu.auth0.com/authorize?response_type=code&code_challenge=YYYY&code_challenge_method=S256&client_id=ZZZ&redirect_uri=XXX&audience=YYY&state=ZZZ&scope=openid+email+profile)

Sometimes the login screen appears with only a pink square a the top:

 ![LoginBroken](https://global.discourse-cdn.com/auth0/original/3X/4/7/47301d1fa37775eca653d453e39ddc79223e3285.png)

When I resize the window, or attach the Safari developer debugger the webview resizes and looks ok:

 ![LoginOk](https://global.discourse-cdn.com/auth0/original/3X/9/3/93f708ad8b41d9b8b2ab209405ddcab6bfd4693f.png)

When I set the window width greater than 480 the contents change to the inset login window and the problem goes away.

When I reload the page it randomly changes between broken and ok state.

How can I make sure that the webview looks ok all the time with window size smaller than 480 pixels?

Thanks in advance for your help.  
Markus Kirschner

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 16, 2020, 1:52pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/2 "2020-04-16T13:52:37Z")

</div>

Hey there Markus!

Can you tell us what docs / repo / quickstarts of ours are you using? Thanks!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 21, 2020, 1:18pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/4 "2020-05-21T13:18:25Z")

</div>

Hey there!

Have you managed to get past your struggle in the meantime?

---

<div class="post-metadata">

**Author:** ![markus.kirschner](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markus.kirschner/32/20493_2.png) [@markus.kirschner](https://community.auth0.com/u/markus.kirschner)\
**Post date:** [May 21, 2020, 1:40pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/5 "2020-05-21T13:40:20Z")

</div>

Hi Konrad,  
no. It just happens sometimes. Regarding the previous question: I am calling the plain URL constructed according to your documents and opening them in an WKWebView.  
Not sure what I should add here.  
I works 90 % of the time, however in 10 % our customers would get stuck so I need to get a fix for this.  
Greetings,  
Markus

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 21, 2020, 2:51pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/6 "2020-05-21T14:51:18Z")

</div>

Can you tell me what SDK you’re using our the quickstart you’re using so we can file potentially a GitHub issue for that? Thanks!

---

<div class="post-metadata">

**Author:** ![markus.kirschner](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markus.kirschner/32/20493_2.png) [@markus.kirschner](https://community.auth0.com/u/markus.kirschner)\
**Post date:** [May 21, 2020, 3:25pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/7 "2020-05-21T15:25:19Z")

</div>

I do not use an SDK, just plain HTTP requests.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 25, 2020, 10:11am UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/8 "2020-05-25T10:11:58Z")

</div>

Gotchya! I guess it’s simply not optimized for this variety of screens but let me reach out to appropriate teams!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 25, 2020, 4:00pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/9 "2020-05-25T16:00:04Z")

</div>

This topic was automatically closed after 4 days. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 26, 2020, 9:16am UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/10 "2020-05-26T09:16:50Z")

</div>



---

<div class="post-metadata">

**Author:** ![HLR](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hlr/32/21279_2.png) [@HLR](https://community.auth0.com/u/HLR)\
**Post date:** [May 26, 2020, 3:35pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/12 "2020-05-26T15:35:27Z")

</div>

I was having this exact same problem here:

[http://community.auth0.com/t/using-sample-php-code-on-ios-12-auth0-login-page-hangs](http://community.auth0.com/t/using-sample-php-code-on-ios-12-auth0-login-page-hangs)

This was using any mobile iOS browser - Chrome or Safari on all iOS devices for 50% of my iOS logins.

It eventually “just stopped” happening so I was no longer able to recreate to show the Auth0 team, but there is a real problem here on the Auth0 side.

EDIT TO ADD: Try using the “Universal Login” instead of the classic login. That always works.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [May 27, 2020, 2:14pm UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/13 "2020-05-27T14:14:46Z")

</div>

@markus.kirschner can you let me know how it behaves when you switch to Universal Login then?

---

<div class="post-metadata">

**Author:** ![markus.kirschner](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markus.kirschner/32/20493_2.png) [@markus.kirschner](https://community.auth0.com/u/markus.kirschner)\
**Post date:** [May 29, 2020, 9:40am UTC](https://community.auth0.com/t/the-login-window-in-a-wkwebview-on-macos-is-sometimes-broken/41048/14 "2020-05-29T09:40:36Z")

</div>

@konrad.sopala I was under the impression, that I was using the universal login. How would I do that?
