# Redirect using cookies after login

**URL:** <https://community.auth0.com/t/redirect-using-cookies-after-login/85836>\
**Category:** Get Help\
**Created:** [June 23, 2022, 6:45pm UTC](https://community.auth0.com/t/redirect-using-cookies-after-login/85836 "2022-06-23T18:45:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cshamah](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cshamah/32/38346_2.png) [@cshamah](https://community.auth0.com/u/cshamah)\
**Post date:** [June 23, 2022, 6:45pm UTC](https://community.auth0.com/t/redirect-using-cookies-after-login/85836/1 "2022-06-23T18:45:32Z")

</div>

Currently working on a SharePoint site with auth0 universal login.  
I’m trying to redirect users back to the page they came from after they log in.

The problem is that when we try and redirect to a page with multiple query parameters, anything after the first parameter gets removed. From what ive seen, there doesnt seem to be a way to fix this issue (although if there is i would appreciate a solution!).

So we’ve started looking into using cookies to redirect using auth0 actions. The problem is that i cant seem to find a way to actually read the cookies from the session through actions, if anyone has a solution to either of these problems it would be greatly appreciated!!

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [June 28, 2022, 5:15pm UTC](https://community.auth0.com/t/redirect-using-cookies-after-login/85836/3 "2022-06-28T17:15:42Z")

</div>

Hi @cshamah,

Welcome to the Auth0 Community!

We recommend using state to redirect users after login.

Here is the doc for it:

> **[Prevent Attacks and Redirect Users with OAuth 2.0 State Parameters](https://auth0.com/docs/secure/attack-protection/state-parameters)**
>
> Describes how to use the state parameter in authentication requests to help prevent CSRF attacks and restore state

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [December 21, 2022, 4:05pm UTC](https://community.auth0.com/t/redirect-using-cookies-after-login/85836/4 "2022-12-21T16:05:50Z")

</div>


