Open sdmcraft opened 1 month ago
Page | Scores | Audits | ||
---|---|---|---|---|
:iphone: | /tools/admin-edit/index.html | |||
:desktop_computer: | /tools/admin-edit/index.html |
@davidnuescheler , @fkakatie , I am using the admin-edit
tool for managing configs of few Helix5 sites I am working on. It works great but one thing I miss is the inability to pass auth token header. Proposing this PR to add support for the same. Can you please review?
@fkakatie , I don't have merge rights in the repo. Could you please help in getting this merged?
the auth token should be added via sidekick, so i don't think that this is the right way of doing this... i think currently it is probably hard to discover, but you should be able to just log into a sidekick (on .page
or .live
of the corresponding project) and auth will be set automatically for you.
the auth token should be added via sidekick, so i don't think that this is the right way of doing this... i think currently it is probably hard to discover, but you should be able to just log into a sidekick (on
.page
or.live
of the corresponding project) and auth will be set automatically for you.
Thanks @davidnuescheler . I am trying to figure out how to get the access token available from the sidekick login. Meanwhile if you have some guidance on how to do that, please let me know.
@sdmcraft As David alluded to, the Sidekick will handle this for you. So there is no need to directly access the token so long as you are logged into the sidekick on same org you are trying to make admin request to.
so long as you are logged into the sidekick on same org you are trying to make admin request to.
~@dylandepass likely I am missing something obvious here. Let's say I am on https://main--helix-labs-website--adobe.aem.live/tools/admin-edit/index.html and want to invoke api for OrgA. I open up the sidekick and login. In the login flow, I am not presented with the option anywhere to login to OrgA, it just takes me through the login flow. So how do I ensure that I am logged in to orgA via the sidekick while I am on the page https://main--helix-labs-website--adobe.aem.live/tools/admin-edit/index.html~
Ok, so looks like here's the flow that works:
i think currently it is probably hard to discover, but you should be able to just log into a sidekick (on
.page
or.live
of the corresponding project) and auth will be set automatically for you.
For better discoverability of the flow to add auth header, I can add a "Login" button on the page somewhere. When clicked, the user is prompted to login via https://admin.hlx.page/login/org/site/main . Post this admin api requests from the admin tool would automatically get the auth header added (and not be required to be explicitly added as originally proposed in this PR). @davidnuescheler do you think this would be useful?
i think currently it is probably hard to discover, but you should be able to just log into a sidekick (on
.page
or.live
of the corresponding project) and auth will be set automatically for you.yes, we have an error message in the log viewer that links them to their project asking them to sign into the sidekick.
For better discoverability of the flow to add auth header, I can add a "Login" button on the page somewhere. When clicked, the user is prompted to login via https://admin.hlx.page/login/org/site/main .
Just logging in to admin.hlx.page might not be enough, logging into the sidekick is what would work.
Test URLs: