# SAML idp not getting redirect when token expires

**URL:** https://forum.mautic.org/t/saml-idp-not-getting-redirect-when-token-expires/20596
**Category:** Product Support
**Created:** [August 25, 2021, 11:04pm UTC](https://forum.mautic.org/t/saml-idp-not-getting-redirect-when-token-expires/20596 "2021-08-25T23:04:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![donbowman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/donbowman/32/5702_2.png) [@donbowman](https://forum.mautic.org/u/donbowman)
#### Post date: [August 25, 2021, 11:04pm UTC](https://forum.mautic.org/t/saml-idp-not-getting-redirect-when-token-expires/20596/1 "2021-08-25T23:04:11Z")

</div>

**Your software**  
My Mautic version is: 4.0.0-rc  
My PHP version is: 7.4  
My Database type and version is: tidb

**Your problem**  
My problem is:

My SSO login works just fine (Google G Workplace IdP via SAML).  
Once logged in, if i let mautic go idle, and then click on a link (e.g. click on dashboard), I get:

1. a redirect to [https://MYINSTANCE/s/saml/login](https://MYINSTANCE/s/saml/login)
2. a redirect to /saml/discovery
3. a redirect /s/saml/login?idp=https://accounts.google.com/o/saml2?idpid=…
4. a 200 OK from [https://MYINSTANCE/s/saml/login?idp=https://accounts.google.com/o/saml2?idpid=](https://MYINSTANCE/s/saml/login?idp=https://accounts.google.com/o/saml2?idpid=)…

either #3 or #4 is incorrect. Nowhere does it redirect to [https://accounts.google.com](https://accounts.google.com), so i end up stuck.

the visual effect in the browser is “nothing happened”, e.g. click on dashboard, no change (still on calendar eg)

Suggestions? If I now navigate to [https://MYINSTANCE](https://MYINSTANCE), it will work, but this is very frustrating for users.

---

<div class="post-metadata">

### Author: ![1pradev](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/1pradev/32/6954_2.png) [@1pradev](https://forum.mautic.org/u/1pradev)
#### Post date: [October 11, 2022, 6:02pm UTC](https://forum.mautic.org/t/saml-idp-not-getting-redirect-when-token-expires/20596/2 "2022-10-11T18:02:01Z")

</div>

Hello. Did you ever get a working solution to this? I’m coming up against the same issue with my session timeout and would like to be able to redirect to my IDP without being stuck on the timed-out page. I didn’t see any responses to your question and I’ve posted my question [here](https://forum.mautic.org/t/saml-redirect-on-idle-session-timeout/25645) in the hopes that it might get some responses.

---

<div class="post-metadata">

### Author: ![marc.beinder](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/marc.beinder/32/7256_2.png) [@marc.beinder](https://forum.mautic.org/u/marc.beinder)
#### Post date: [October 17, 2022, 3:45pm UTC](https://forum.mautic.org/t/saml-idp-not-getting-redirect-when-token-expires/20596/3 "2022-10-17T15:45:45Z")

</div>

I’m getting the exact same issue. However in my case, the timeout happens much faster than configured. Normally within minutes of logging in Mautic will freeze up and I’ll have to refresh in order to trigger the reauth.
