Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adobe I/O Runtime Stage Authorization #1245

Open
aleksitto-gh opened this issue Oct 25, 2024 · 0 comments
Open

Adobe I/O Runtime Stage Authorization #1245

aleksitto-gh opened this issue Oct 25, 2024 · 0 comments

Comments

@aleksitto-gh
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant