# RStudio when launched without Singularity is having strange troubles with authentication

**URL:** <https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213>\
**Category:** Get Help\
**Tags:** question\
**Created:** [November 18, 2020, 10:13pm UTC](https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213 "2020-11-18T22:13:59Z")\
**Posts on this page:** 1\
**Showing post:** 42

<div class="post-metadata">

**Author:** ![jeff.ohrstrom](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/jeff.ohrstrom/32/136_2.png) [@jeff.ohrstrom](https://discourse.openondemand.org/u/jeff.ohrstrom)\
**Post date:** [June 22, 2021, 2:12pm UTC](https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213/42 "2021-06-22T14:12:45Z")

</div>

If you need to pass something back to the view (like the csrftoken) you can use `conn_params` for this.

[https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/basic-bc-options.html](https://osc.github.io/ood-documentation/latest/reference/files/submit-yml/basic-bc-options.html)

```auto
# submit.yml
conn_params:
  - csrf_token

```

```ruby
# before.sh.erb
# this may actualy be case sensitive, so maybe csrf_token would work
export CSRF_TOKEN="<$= SecureRandom.uuid >"

```

Then you can use it directly in your view.html.erb like you use host/port and so on.

```auto
  document.cookie = "csrf-token=<%= csrf_token %>;

```

Once you export the variable in the before script, it should get written automatically to `connection.yml`. It may be problematic to write or rewrite that file, so it’s probably safer to use this mechanism `conn_params`.

---

_[View the full topic](https://discourse.openondemand.org/t/rstudio-when-launched-without-singularity-is-having-strange-troubles-with-authentication/1213)._
