No cookies in browser after redirect

Running a web project. It has to forward off to another site for OAuth2 communication. I create a UUID, write some data in a cookie named after the UUID. Send the UUID along with the OAuth data, which gets returned. The OAuth server redirects back to the project. I parse out the UUID, and try to read the Cookie, and there is only one. Here is an excerpt from the log I wrote:

2019-07-25 00:25:34(proweb.debug: Cookies Before: 105 2019-07-25 00:25:34(proweb.debug: Cookies After: 106 2019-07-25 00:25:38(proweb.debug: Cookies Now: 1 2019-07-25 00:25:38(proweb.debug: Cookie #0: JSESSIONID
You can see, before I wrote the Cookie, there were 105. After I wrote the data, 106. When the OAuth server redirected back to the app, 1. Named JSESSIONID.
Do I need to use a timer and wait for the browser to catch up? I’m querying after the session.open, in the webpage.shown. The cookie is set to expire after 30 minutes, so the 4 seconds it takes, should be fine.

Is the connection changing from http to https or vice versa?

Debugging locally under HTTP when I write the cookie. Forwarding to the OAuth server via HTTPS. When it returns, it is not secure again, when I try to read the cookie. This is Chrome on the Mac.

So your code sets the cookie and then does a ShowURL? If so, that may be the issue. The cookie may be getting set as “secure”

I found it. Xojo launches the app with the IP address 127.0.0.1. The OAuth server returns to localhost.