Jupyter app ask for password first time, works second time

OK forget the authentication bit. It looks like you’re correctly passing auth in the first request.

Let’s now assume it’s a problem with redirection and maybe setting and passing cookies. Sorry it took this long to get here.

Here is what a correct redirection flow is. Notice the status codes received from login and 55808 are 302 Found.

Seems that your 302 redirects are not working the first time?

Here’s what my very first 302 redirect response looks like. See the locaion is relative (yours has your SSO host in it) and it’s from a different Server even. You’re being redirected by your SSO or OOD (Apache 2.4.34 seems like it’s ours) whereas I’m being redirected by Juypter itself (TornadoServer is what Jupyter uses)
image

I don’t know much about CAS, but maybe you need to tweak your CASScope? I’ve seen in other threads folks need to set that to /.