Adobe Developer Console requires the redirect_uri for an oauth credential to escape all . characters with \\, so https://example.com will need to be https://example\\.com (not a valid uri). In the downloaded project json, this value is further escaped as https://example\\\\.com (also not a valid uri).
Expected
aio app init does not have a configuration error for oauth webapp credentials.
Description
Adobe Developer Console requires the
redirect_uri
for an oauth credential to escape all.
characters with\\
, sohttps://example.com
will need to behttps://example\\.com
(not a valid uri). In the downloaded project json, this value is further escaped ashttps://example\\\\.com
(also not a valid uri).Expected
aio app init
does not have a configuration error for oauth webapp credentials.Actual
Error during
aio app init
:Repro steps
Adobe Stock
as a servicehttps://example.com
as theredirect_uri
(escape as required) and thedefault_redirect_uri
aio app init
and choose the ProjectSample client credential that shows the issue:
Fix
We remove strict
uri
validation from the schema and treat it as a string, since Adobe Developer Console would already do the validation it needs. https://github.com/adobe/aio-cli-plugin-app/blob/682f103012c48938bb9915a024cdd6cb29cfea03/schema/config.schema.json#L216There are two occurrences:
oauth2
andoauthsinglepageapp
.Workaround
.json
from Adobe Developer Console (Download All
button in Project Overview)redirect_uri
from the credential to remove the escapesaio app init --import YOUR_CONSOLE_JSON_PATH_HERE.json [PROJECT_PATH]
ORaio app use YOUR_CONSOLE_JSON_PATH_HERE.json