Auth0 Home Blog Docs

Callback URL with AWS S3 hosted site returns 404


I have an Angular 5 SPA with Auth0 running on a Serverless backend (AWS S3, API Gateway, Lambda, DynamoDB). Everything tested locally works perfectly. Upon entry to the application, an AuthGuard checks token status, if false, sends the user to Auth0. User logs in using Auth0 and gets sent to the redirectUri localhost:4200/callback endpoint. The callback component handles the authentication and sends user back to the home page logged in.

The problem arises when using this in production. I have a dist build of the Angular 5 application hosted on an S3 bucket. In my Allowed Callback URLs in the dashboard I have, . After user logs in it hits the redirect uri ( and I get a 404 not found. Is there any way to have an additional callback URL on S3 so the user can be redirected back to the homepage logged in?


I don’t have a solution but have exactly the same issue. As far as I can tell it makes no difference to the performance/function of my Angular app but I hate having errors show up. Did you ever get any closure on this?


I had the exact same problem with Angular 5 SPA.

This solved my problem:

Basically, you add the index.html as the Error document in S3.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.