Score:0

Errors when providing or generating keys for Simple OAuth module

in flag

I'm trying to configure simple_oauth to use with local Lando install of a Drupal 9 site with decoupled React frontend.

I've tried to manually generate the keys in the terminal:

$ openssl genrsa -out private.key 2048
$ openssl rsa -in private.key -pubout -out public.key

...placing the keys into a sibling directory of /web/ and /vendor/ called /keys/.

It throws these error messages:

"The Public Key file does not exist." "The Private Key file does not exist."

So then I tried pressing the "Generate Keys" button. When prompted for a "Directory for the keys", I input the same path to that /keys/ folder

Despite copying the output of a pwd from terminal directly into the field, it throws this error:

'Directory "/home/myusername/Desktop/react1/keys" is not a valid directory.'

What am I missing here?

id flag
You didn't define that "it" as is in "It throws these error messages..." but I assume that's a module. Is it? If so, is the directory readable by the web server user?
raresample avatar
in flag
Yes, "it" is simple_oauth module. The tutorial I was following on Drupalize.me showed a standard file path, and I didn't yet realize that using Lando means I had to specify the directory relative to the "/app" project root
Score:0
in flag

I was able to get it working just by using "/app/keys" as the paths on ~/admin/config/people/simple_oauth, instead of the actual path on my machine as in the OP.

I suppose this comes down to me having an opportunity to learn more about Lando+Drupal.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.