# Solid authorization and data handling without frontend?

**URL:** <https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874>\
**Category:** Build a Solid App\
**Created:** [April 10, 2020, 8:41am UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874 "2020-04-10T08:41:13Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 10, 2020, 8:41am UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/1 "2020-04-10T08:41:13Z")

</div>

Dear solid community,

About a month ago I made a post on the sunreddit asking for some advice for picking the right ontology for a university project.  
[https://www.reddit.com/r/SOLID/comments/ffa8g3/beginner\_questions/](https://www.reddit.com/r/SOLID/comments/ffa8g3/beginner_questions/)

In the meantime the choices regarding the ontlogy have been made and we were able to produce a static dataset in valid ttl syntax to verify we have all needed components.

This time I have a specific implementation question:  
Is there a possibility to read and write files on a solid pod without having to run our code in the browser?  
In the ideal case we’d want to run our code in a node.js server without a frontend whatsoever.

I decided to make this post because it seems like there are only two options available for solid authentication:

> **[GitHub - nodeSolidServer/solid-auth-client: A browser library for performing...](https://github.com/nodeSolidServer/solid-auth-client)**
>
> A browser library for performing authenticated requests to Solid pods - GitHub - nodeSolidServer/solid-auth-client: A browser library for performing authenticated requests to Solid pods

Which is profiled as being specifically a library to be used in browser development, and there following is stated specifically in the readme:

> Note that this library is intended for the browser. You can use Node.js as a development environment, but not for actually logging in and out or making requests.

Furthermore there is:

> **[GitHub - solid-contrib/solid-client: Javascript client library for Solid...](https://github.com/solid-contrib/solid-client#not-supported---please-use-solid-auth-client)**
>
> Javascript client library for Solid applications. Contribute to solid-contrib/solid-client development by creating an account on GitHub.

But this library seems to have been deprecated 2 years ago and I suppose it’s better if we stay away from it.

Best regards,  
Flor Sanders

---

<div class="post-metadata">

**Author:** ![Smag0](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/smag0/32/310_2.png) [@Smag0](https://forum.solidproject.org/u/Smag0)\
**Post date:** [April 10, 2020, 8:57am UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/2 "2020-04-10T08:57:06Z")

</div>

Hi, did you take a look at @jeffz solid-auth-cli [http://forum.solidproject.org/t/solid-auth-cli-browserless-persistent-login/](http://forum.solidproject.org/t/solid-auth-cli-browserless-persistent-login/) ?

---

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 10, 2020, 8:58am UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/3 "2020-04-10T08:58:18Z")

</div>

Just stumbled across it a couple of seconds ago ny reading some other post, more specifically:

> [@Use solid pod as back-end login](http://forum.solidproject.org/t/use-solid-pod-as-back-end-login/1440):
>
> I am currently developing an angular web app backed by a node/express server. The back-end is serving some kind of apps which the users can create and publish to other users. I want to use solid pods to store the users data used within the apps. Because i don’t want to burden the users with two different logins, id like to use webid-oidc to use the solid pod for back-end authentication. The problem is that the [solid-auth-client](https://github.com/solid/solid-auth-client) and [solid-auth-oicd](https://github.com/solid/solid-auth-oidc) are not designed for back-end usage. I want to i…

Thanks for the answer! I think that solves the problem alltogether.

Flor

---

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 11, 2020, 3:57pm UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/4 "2020-04-11T15:57:38Z")

</div>

I seem to be getting this error, does anyone know how to fix it?

> <https://github.com/solid/solid-cli/issues/15>
>
> This seems to be a consequence of PR #12 that I had pushed couple of days ago. T…here have been more than a few breaking changes in @solid/oidc-rp. However, roll back is not preferable either because the older crypto library is now deprecated.
> 
> I get the following error when trying to login with solid-auth-cli (there was no error with the previous version):
> \`\`\`
> AssertionError \[ERR\_ASSERTION\]: Missing scope parameter in authentication request   
> at ~\\node\_modules\\@solid\\oidc-rp\\src\\AuthenticationRequest.js:61:9
> at processTicksAndRejections (internal/process/task\_queues.js:97:5)
> at async SolidClient.createSession (~\\node\_modules\\@solid\\cli\\src\\SolidClient.js:48:21)
> at async SolidClient.login (~\\@solid\\cli\\src\\SolidClient.js:31:17)
> at async Object.login (~\\node\_modules\\solid-auth-cli\\src\\index.js:69:19) {
> generatedMessage: false,
> code: 'ERR\_ASSERTION',
> actual: undefined,
> expected: true,
> operator: '=='
> }
> \`\`\`
> 
> I am not sure if the bug itself is in solid-cli or in oidc-rp. \`defaults\` argument to \`RelyingParty\` class does not have a \`authenticate.scope\` property or \`defaults\` are not being deeply merged in the \`RelyingParty\` constructor. Either way the property is missing...

This issue mentions adding scope ‘openid’ to solid-cli, but I don’t really have a clue as to how that should be done.  
Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [April 11, 2020, 4:00pm UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/5 "2020-04-11T16:00:52Z")

</div>

What OS are you using? How are you calling solid-cli?

---

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 11, 2020, 4:02pm UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/6 "2020-04-11T16:02:40Z")

</div>

I’m on windows 10, I’m attempting to use your solid-auth-cli tool in a nodejs environment.

---

<div class="post-metadata">

**Author:** ![jeffz](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/jeffz/32/600_2.png) [@jeffz](https://forum.solidproject.org/u/jeffz)\
**Post date:** [April 11, 2020, 4:08pm UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/7 "2020-04-11T16:08:51Z")

</div>

I’m afraid I don’t have a windows box to test on. Make sure that you use the latest solid-auth-cli and have clean-installed all of its dependencies. Make sure that you don’t have any @trust or @solid libraries in a global place where they might be used instead. If you still get the problem, possibly try reverting to earlier versions of solid-cli and its dependencies in @trust. I hope to have time soon to look into this further, unfortunately that won’t be immediately. Please let me know of your progress or lack of it.

---

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 11, 2020, 4:42pm UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/8 "2020-04-11T16:42:59Z")

</div>

I had just clean installed everything (locally) but started fresh and repeated everything again, which gave me the same results.  
I tried rolling back @solid/cli all the way through to 1.0.0 making sure to roll back @solid/oidc-rp as well to the version mentioned in the package.json file, but to no avail either.  
Thanks for the suggestions already, if you have any more ideas on what I could try be sure to let me know.  
I’ll try fooling around some more, might even install an ubuntu vm to see wether running it in a linux environment solves anything and I’ll be sure to let you know the results.

---

<div class="post-metadata">

**Author:** ![FlorSanders](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.solidproject.org/florsanders/32/1566_2.png) [@FlorSanders](https://forum.solidproject.org/u/FlorSanders)\
**Post date:** [April 12, 2020, 6:54am UTC](https://forum.solidproject.org/t/solid-authorization-and-data-handling-without-frontend/2874/9 "2020-04-12T06:54:39Z")

</div>

With the help of CxRes’s pointers I was able to apply the quick fix of adding the ‘openid’ scope to the authenticate object and got it working. (See Github Issue mentioned previously).  
If I could be of any more help to try and figure out a general fix, please let me know.  
For the meantime I can get back to working on this project.  
Thanks for the help!
