# Authenticate device is ignoring username field on https?

**URL:** <https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400>\
**Category:** Local Setup\
**Created:** [September 9, 2025, 3:47pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400 "2025-09-09T15:47:17Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [September 9, 2025, 3:47pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/1 "2025-09-09T15:47:17Z")

</div>

Hello,

When running on a http server and creating a new user with AuthenticateDeviceAsync and the username field, it works normally. When running on https server with the same parameters, it seems to ignore the username field and generate a random username.

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 10, 2025, 1:04pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/2 "2025-09-10T13:04:49Z")

</div>

Hi @crowie,

I don’t see how the protocol would affect user creation logic. Can you provide a reproducible example?

Best

---

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [September 10, 2025, 1:36pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/3 "2025-09-10T13:36:05Z")

</div>

![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/b/b4b9a2381c4ac9130d591d1e41d6622f9e02a6d0.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/1/136a406a75bcb45594f1a39756a024eac9930542.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/9/9d828687b375d5c7e3820574fca332652bdff325.png)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/f/f0b817494e95894df88e2bc2325c09ad629fa923.png)

Using the same code just changing, scheme from http to https and port from 7350 to 443.  
USERNAMECHECK is created on http, but swapping to https generates a random name.

I am using Unity 6000.1.2f1 and Nakama 3.15.0

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 10, 2025, 2:04pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/4 "2025-09-10T14:04:23Z")

</div>

Something isn’t adding up - how did you set up https on Nakama?

Also, I’d urge you to upgrade to the latest Nakama version and the latest SDK as well.

---

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [September 10, 2025, 3:33pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/5 "2025-09-10T15:33:26Z")

</div>

I have updated both and still the same result.

http for host is using an ip address hosted to a docker container.  
https for host is using a domain from cloudfront that is taking http traffic into https

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 10, 2025, 4:19pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/6 "2025-09-10T16:19:43Z")

</div>

@crowie are the query params being forwarded correctly to the server? Because I can’t replicate the issue locally.

---

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [September 13, 2025, 12:05pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/7 "2025-09-13T12:05:25Z")

</div>

I haven’t changed any settings besides what I’ve shown. How would I check the query params?

---

<div class="post-metadata">

**Author:** ![sesposito](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.heroiclabs.com/sesposito/32/2594_2.png) [@sesposito](https://forum.heroiclabs.com/u/sesposito)\
**Post date:** [September 15, 2025, 9:55am UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/8 "2025-09-15T09:55:49Z")

</div>

I mean your cloudfront proxy.

---

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [October 30, 2025, 4:18pm UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/9 "2025-10-30T16:18:54Z")

</div>

Sorry for the late reply had other focuses. I managed to update the proxy to query strings and that allows for account creation. Now however when I call GetAccountAsync(session) it tells me I don’t have an auth token, even though I do. Is there anything else needed for permissions?

![erro1](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/2/24a388206a819a1facb31ab5091bcbd070df9e2b.png)

 ![cache](https://us1.discourse-cdn.com/flex020/uploads/heroiclabs/original/2X/c/cb64d7eff23c787fcc11e17fa70631b7001f9737.png)

---

<div class="post-metadata">

**Author:** ![crowie](https://avatars.discourse-cdn.com/v4/letter/c/b782af/32.png) [@crowie](https://forum.heroiclabs.com/u/crowie)\
**Post date:** [October 31, 2025, 10:53am UTC](https://forum.heroiclabs.com/t/authenticate-device-is-ignoring-username-field-on-https/6400/10 "2025-10-31T10:53:12Z")

</div>

I added Authorization to the header which fixed the GetAccountAsync(session), now I’m just having issues on socket.ConnectAsync unable to connect
