fix cookie issue (#1002)

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **Bug Fixes**
* Enhanced platform-specific handling for cookie refresh operations with
improved error detection and logging.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
BilalG1 2025-11-06 11:02:53 -08:00 committed by GitHub
parent e31bba4337
commit 5c816a02e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -590,9 +590,12 @@ export class _StackClientAppImplIncomplete<HasTokenStore extends boolean, Projec
hostname = window.location.hostname;
}
// IF_PLATFORM next
hostname = (await sc.headers?.())?.get("host");
else {
hostname = (await sc.headers?.())?.get("host");
}
// END_PLATFORM
if (!hostname) {
console.warn("No hostname found when queueing custom refresh cookie update");
return;
}
const domain = await this._trustedParentDomainCache.getOrWait([hostname], "read-write");