Select to view content in your preferred language

Unable to Access App Hosted on AWS S3 - "Invalid redirect_uri" (Error 400)

108
0
12-02-2024 02:42 PM
Labels (1)
Danielb3
Emerging Contributor

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:

  1. Registered the application in ArcGIS Online.
  2. Added the correct Redirect URL in the app’s settings under Redirect URLs.
  3. Verified that the redirect_uri in the OAuth request matches exactly with the registered URL.
  4. 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:

  1. Could my changes to config.json impact the redirect process?
  2. Is there a specific setting in ArcGIS Online that needs to be configured for apps hosted on AWS S3?
  3. 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

 

0 Kudos
0 Replies