on 2023 Dec 04 5:18 PM
Following exacly the bookshop tutorial (https://developers.sap.com/tutorials/cp-cap-java-security-cf.html) I retrieve this error in my authentication step.
My xs-security.json
{
"xsappname": "bookstore",
"tenant-mode": "dedicated",
"scopes": [
{
"name": "$XSAPPNAME.Administrators",
"description": "Administrators"
}
],
"attributes": [],
"role-templates": [
{
"name": "Administrators",
"description": "generated",
"scope-references": [
"$XSAPPNAME.Administrators"
],
"attribute-references": []
}
],
"role-collections": [
{
"name": "BookStore_Administrators",
"description": "BookStore Administrators",
"role-template-references": ["$XSAPPNAME.Administrators"]
}
],
"oauth2-configuration": {
"redirect-uris": ["https://api.cf.us10-001.hana.ondemand.com"]
}
}
How can I solve it?
Request clarification before answering.
Thanks a lot to answer me, but I tried with:
"oauth2-configuration": {
"redirect-uris": ["https://*.us10-001.hana.ondemand.com"]
}
and "oauth2-configuration": {
"redirect-uris": ["https://*.us10-001.hana.ondemand.com/**"]
}
But I receive from postman in Auth2 request this error:Invalid redirect https://xxxxxxxx-xxxxxxx-xxxxxxxx-by.cfapps.us10-001.hana.ondemand.com did not match one of the registered valuesYou must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
davecor Please check the following documentation:
https://help.sap.com/docs/btp/sap-business-technology-platform/security-considerations-for-sap-autho...
Specifically, "Set the redirect-uris property to restrict access as much as possible.".
davecor
Issue was in line redirect-uri.. you can consider the below and try it ..
redirect-uris": ["https://*.us10-001.hana.ondemand.com"]
{
"xsappname": "bookstore",
"tenant-mode": "dedicated",
"scopes": [
{
"name": "$XSAPPNAME.Administrators",
"description": "Administrators"
}
],
"attributes": [],
"role-templates": [
{
"name": "Administrators",
"description": "generated",
"scope-references": [
"$XSAPPNAME.Administrators"
],
"attribute-references": []
}
],
"role-collections": [
{
"name": "BookStore_Administrators",
"description": "BookStore Administrators",
"role-template-references": ["$XSAPPNAME.Administrators"]
}
],
"oauth2-configuration": {
"redirect-uris": ["https://*.us10-001.hana.ondemand.com"]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
22 | |
9 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.