# Modifying state Parameter and Manually Triggering Reauthentication in Spring WebFlux with OAuth2

**URL:** <https://community.auth0.com/t/modifying-state-parameter-and-manually-triggering-reauthentication-in-spring-webflux-with-oauth2/118598>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, auth0-java\
**Created:** [October 16, 2023, 6:45am UTC](https://community.auth0.com/t/modifying-state-parameter-and-manually-triggering-reauthentication-in-spring-webflux-with-oauth2/118598 "2023-10-16T06:45:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![b.muhammad](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@b.muhammad](https://community.auth0.com/u/b.muhammad)\
**Post date:** [October 16, 2023, 6:45am UTC](https://community.auth0.com/t/modifying-state-parameter-and-manually-triggering-reauthentication-in-spring-webflux-with-oauth2/118598/1 "2023-10-16T06:45:08Z")

</div>

Hello community!

I’ve been working with Spring WebFlux and OAuth2, specifically implementing OIDC with WebSession. Once a user is authenticated and has a session, I would like to update the `state` parameter on `org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest` and manually trigger re-authentication, either from a service or a web filter.

Here’s a brief overview of my setup:

- **Framework** : Spring WebFlux
- **Authentication** : OAuth2 with OIDC (using WebSession)
- **Goal** : Update the `state` parameter post-authentication and manually trigger re-authentication.

I have already implemented a custom `ReactiveOAuth2AuthorizationRequestResolver`. However, it seems to work only with the default authentication workflow. I’m trying to find a way to customize the authorization process and trigger it again manually, post-authentication.

If anyone has experience with this or can provide guidance, it would be greatly appreciated!

Thank you!

---

<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:** [October 20, 2023, 7:12pm UTC](https://community.auth0.com/t/modifying-state-parameter-and-manually-triggering-reauthentication-in-spring-webflux-with-oauth2/118598/3 "2023-10-20T19:12:01Z")

</div>

Hi @b.muhammad,

Welcome to the Auth0 Community!

Unfortunately I don’t have a solution for this, but I was able to find this answer on SO that seemed like a possible solution: [customize state parameter with Oauth2client using spring security - Stack Overflow](https://stackoverflow.com/questions/66115098/customize-state-parameter-with-oauth2client-using-spring-security)

Hopefully someone else here can weigh in.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 8, 2023, 4:11pm UTC](https://community.auth0.com/t/modifying-state-parameter-and-manually-triggering-reauthentication-in-spring-webflux-with-oauth2/118598/4 "2023-11-08T16:11:02Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
