# Rstudio 2023.12.1-402 invalid CSRF form

**URL:** <https://discourse.openondemand.org/t/rstudio-2023-12-1-402-invalid-csrf-form/3393>\
**Category:** Get Help\
**Tags:** question\
**Created:** [April 1, 2024, 4:04pm UTC](https://discourse.openondemand.org/t/rstudio-2023-12-1-402-invalid-csrf-form/3393 "2024-04-01T16:04:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![lhuang](https://avatars.discourse-cdn.com/v4/letter/l/b38774/32.png) [@lhuang](https://discourse.openondemand.org/u/lhuang)\
**Post date:** [April 1, 2024, 10:21pm UTC](https://discourse.openondemand.org/t/rstudio-2023-12-1-402-invalid-csrf-form/3393/4 "2024-04-01T22:21:00Z")

</div>

I’ve figured this out based on someone else solution. It was in the auth script. I had to change “ne” to “lt”

```auto
if [[$# -ne 1]]; then

```

> [@RStudio when launched without Singularity is having strange troubles with authentication](https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213/21):
>
> … Okay so can confirm replacing ‘-ne’ with ‘-lt’ in the template/bin/auth totally fixed our issue. I absolutely love that this worked and thanks for the call out… but dang SO much time for that one issue. Thanks!

This is also because the step by step instructions is to clone from [GitHub - OSC/bc\_example\_rstudio: An example OnDemand interactive RStudio app using Singularity](https://github.com/OSC/bc_example_rstudio)  
Which is slightly out of date hence why the difference in auth file.

---

_[View the full topic](https://discourse.openondemand.org/t/rstudio-2023-12-1-402-invalid-csrf-form/3393)._
