Description
Hi I am trying to find out how to use React component with SSR. So I use this archetype with the -D enableSSR=y flag but I am not able to authorize my request when trigger the build.
Expected Behaviour
SSR changes deployed successfully
Actual Behaviour
[INFO] › Error: GET https://adobeioruntime.net/api/v1/namespaces/.....
[INFO] › ab-stage/packages Returned HTTP 401 (Unauthorized) --> "The supplied
[INFO] › authentication is invalid"
Reproduce Scenario (including but not limited to)
Steps to Reproduce
- Created new Adobe IO project on the developer console using the App builder template with I/O runtime
- Enable OAuth Server-to-Server
- Generate access key
- Copy key to the <aio.runtime.auth>...</aio.runtime.auth>
- Copy namespace to <aio.runtime.namespace>...</aio.runtime.namespace>
- Run the maven build
I can build the project but I can not do it with enabled SSR.
When I specify the "serverSideRender-runtime" profile I see that it tries to deploy the SSR changes but it fails with authorization.
I tried the same for the production environment with the product key but was not able to manage it as well.
So I guess there are two issues, but I can be wrong.
The first one - I am not sure if the "https://adobeioruntime.net" hostname is valid for Adobe I/O Runtime for Stage. If that's true, how can I specify the correct hostname? I can do it in the system console for the Remote Content Renderer, but I can't find how to do it in the Maven build. Changing the value in package.json to
"deploy-ssr-ioruntime": "cross-env NODE_ENV=stage aio app deploy"
did not help.
The second issue is probably related to the way I want to get the auth token.
As I mentioned, I tried to use UI for that, and it did not help.
Another way was a curI command. The Bearer token was received but it also did not work.
Also I tried to get it via the aio tool:
aio auth login -b
The command returns the token but it does work, authorization still fails.
So, maybe you can point me to what I am doing wrong? Or there is something I missed?
Platform and Version
AEM 6.5 SP 21