# Native Outsystems ODC App - missing state parameter

**URL:** <https://community.auth0.com/t/native-outsystems-odc-app-missing-state-parameter/185438>\
**Category:** Get Help\
**Tags:** other, missing-category\
**Created:** [April 14, 2025, 10:04am UTC](https://community.auth0.com/t/native-outsystems-odc-app-missing-state-parameter/185438 "2025-04-14T10:04:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kush1](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kush1/32/73206_2.png) [@Kush1](https://community.auth0.com/u/Kush1)\
**Post date:** [April 14, 2025, 10:04am UTC](https://community.auth0.com/t/native-outsystems-odc-app-missing-state-parameter/185438/1 "2025-04-14T10:04:46Z")

</div>

Native app, organisational invitation - “Missing state parameter in response from identity provider” when attempted to return back to app.

Hiya, hopefully someone has done this before, a head scratcher for you.

We have an Outsystems ODC native application.  
We have setup a flow to handle launching the app on a mobile device on click of the invite.  
The login URL setting in Auth0 points to a html/javascript website. The invite link therefore contains this website in its link, and launches it on click.  
The website redirects to the applink of the app, launching the app on the mobile device, and opening the invitation page on Auth0 (this works). The app does this by sending the querystring of the invitation to the /authorize endpoint with a few extras like the client\_id (as per spec).

The user fills in the password, and on submit when returning back to the app, we hit the error message “Missing state parameter in response from identity provider”. Therefore after accepting the invitation, the part where the flow logs the user in fails.

Does anyone have any ideas what I’m missing? I have tested the flow using a browser based app instead of the native app, and this works as designed.

Cheers!

EDIT / Solution →

You need to generate your own state parameter (using a library like uuid or other) in your redirector (redirects from http(s) to applink), and then append state parameter to invite link called from the app. The app can pull parameters like invitation from the querystring passed in.

In essence, update login URI in auth0 to a hosted redirection page at http(s)://…  
On receiving email, click to open redirection page. Pass QueryString params plus generated state value (append to QueryString) to your Applink. App generates auth0 invitation URL and calls it. Auth0 takes over and user can fulfil invitation. On Callback, back to the app , ensure state parameter is the same as that passed.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [April 17, 2025, 11:49pm UTC](https://community.auth0.com/t/native-outsystems-odc-app-missing-state-parameter/185438/3 "2025-04-17T23:49:52Z")

</div>

Hi @Kush1,

Thanks for your question.

I have just checked an organization invitation link generated from the Management API’s [create invitations to an organization](https://auth0.com/docs/api/management/v2/organizations/post-invitations) endpoint. I found that it appends the invitational query parameters to the [tenant’s default login URI](https://auth0.com/docs/authenticate/login/auth0-universal-login/configure-default-login-routes).

If you have been experiencing the “Missing state parameter” error message, have you ensured that the `state` parameter is in the generated invitation URL?

The `state` parameter is used to maintain the state between the request and the callback to prevent CSRF attacks. Therefore, the `state` value must match the same value at the end as it did in the beginning.

Let me know how this goes for you.

Thanks,  
Rueben

---

<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:** [May 1, 2025, 11:50pm UTC](https://community.auth0.com/t/native-outsystems-odc-app-missing-state-parameter/185438/4 "2025-05-01T23:50:44Z")

</div>

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