## Bug description

When opening an invite link and then using SAML to sign up, you don't actually accept the invite, and you're only allowed to sign up if your email address's domain matches the domain whitelist. This happens because for some reason the session state (where the invite ID is stored) is not kept throughout the SAML flow. During the callback to PH, the state appears blank.

## Expected behavior

When opening an invite link and using SAML to sign up, I expect to be able to sign up as with any other SSO and get rejected if my email address does not match the one on the invite.


## How to reproduce

1. Create an invite link
2. Try signing up with SAML
3. See a signup error message

## Environment

- [ ] PostHog Cloud
- [X] self-hosted PostHog, version/commit: _please provide_

## Additional context

@Twixes would you be able to pick this up? Think you have strong context on social login to figure it out (is not particularly a SAML problem).

#### *Thank you* for your bug report – we love squashing them!
ee/api/test/test_authentication.py
settings = cast(Dict, copy.deepcopy(MOCK_SETTINGS))
        settings["SOCIAL_AUTH_SAML_ENABLED_IDPS"]["posthog_custom"][
            "x509cert"
        ] = """MIIDPjCCAiYCCQC864/0fftWQTANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQGEwJV
UzELMAkGA1UECAwCVVMxCzAJBgNVBAcMAlVTMQswCQYDVQQKDAJVUzELMAkGA1UE
CwwCVVMxCzAJBgNVBAMMAlVTMREwDwYJKoZIhvcNAQkBFgJVUzAeFw0yMTA4MjYw
MDAxMzNaFw0zMTA4MjYwMDAxMzNaMGExCzAJBgNVBAYTAlVTMQswCQYDVQQIDAJV
UzELMAkGA1UEBwwCVVMxCzAJBgNVBAoMAlVTMQswCQYDVQQLDAJVUzELMAkGA1UE
AwwCVVMxETAPBgkqhkiG9w0BCQEWAlVTMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A
MIIBCgKCAQEA25s1++GpP9vcXKJ+SN/xdlvPYLir3yMZd/bRfolygQ4BbuzCbqKv
04AGzKfwV11HXxjtQAU/KDtXuVRa+3vZroWcK01GL1C1aH/x0Q2Wy4XZ8Ooi7NlF
MME6vbCIBmXuo4TNouE/VFTz6ntwDNopIdlGDq4M60tFeoT99eDD4OhoCSaIo0aH
2s14CzF0sec3W742yuMHCVyTDrxFzkjMel/CdoNzysvwrqvkGYtLYJn2GSUIoCpG
y6N5CaVkNpAinNSeHKP9qN/z9hSsDNgz0QuTwZ2BxfDWtwJmRJzdQ3Oeq6RlniNY
BBI71zpuQhPeAlyoBg0wG+2ikiCllGug7wIDAQABMA0GCSqGSIb3DQEBCwUAA4IB
AQB8ytXAmU4oYjANiEJVVO5LZUCx3OrY/P1OX73eoXi624yj7xvhaa7whlk1SSL/
2ks8NZNLBFJbUwShdpzR2X+7AlvsLHmodAMq2Oj5x8O+mFB/6DBl0r40NAAsuzVw
2shE4kRi4RXVB0KiyBuExry5YSVTUu8spG4/oTQYJNZFZoSfsHS2mTyprBqqca1j