Hello everyone,
I recently deployed my application to AWS S3 and attempted to integrate it with ArcGIS Online for user authentication via OAuth 2.0. Unfortunately, I encounter the following error when trying to log in:
ArcGIS Portal Directory
Error
Invalid redirect_uri
Error: 400
What I Have Tried:
- Registered the application in ArcGIS Online.
- Added the correct Redirect URL in the app’s settings under Redirect URLs.
- Verified that the redirect_uri in the OAuth request matches exactly with the registered URL.
- Confirmed that the application uses the correct Client ID.
Configuration Notes:
During configuration, I replaced the contents of the config.json file as follows: Previous content:
"attributes": {
"portalUrl": "https://exb.maps.arcgis.com",
"isWebTier": false,
"clientId": "",
"title": "XBLD_AWS",
"description": "XBLD_AWS",
"type": "Web Experience",
"thumbnail": null
}
Replaced with:
"attributes": {
"portalUrl": "https://exb.maps.arcgis.com",
"clientId": "xy"
}
I assume this change shouldn’t matter because after reverting to include the additional information, the app behaves exactly the same.
Additional Context:
- The map I’m trying to display is shared only within my ArcGIS Online organization, but I suspect that’s unrelated to the issue since I cannot even log in to authenticate.
Questions:
- Could my changes to config.json impact the redirect process?
- Is there a specific setting in ArcGIS Online that needs to be configured for apps hosted on AWS S3?
- How can I resolve or debug this issue further?
I’d greatly appreciate any help or suggestions to get the app working. Thank you in advance!
Daniel