fosrl / fosrl/apple

Mac Client will always return as "Unauthorized" when using custom server.session_cookie_name config

Open
#34 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Swift
Stars
31
Forks
11
Avg merge
1m
Merged PRs (30d)
4

Description

### Describe the Bug

Recently I discover that I am able to connect with pangolin client after I reset my changes for the server.session_cookie_name to be the default `p_session_token`, I tried it after checking the code on APIClient.swift, that is has a line of `private let sessionCookieName = "p_session_token"` and without good knowledge of Swift I assume it is hardcoded.

### Environment

- OS Type & Version: MacOS 26.4
- Pangolin Version: 1.16.2
- Gerbil Version: 1.3.1
- Traefik Version: 3.6.12
- Newt Version: 1.11.0
- Client Version: 0.70

### To Reproduce

- Selfhosted
- Set custom value for server.session_cookie_name https://docs.pangolin.net/self-host/advanced/config-file#param-session-cookie-name
- try to connect with the pangolin mac client
- After authentication success, there will be an alert says "Unauthorized"
- Remove the custom value
- restart pangolin server
- reconnect, with the client then everythings is working

### Expected Behavior

custom server.session_cookie_name should be use on APIClient class `private let sessionCookieName = "p_session_token"` line 48

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.