Authenticating using serverless s3 application server


I am building an application using Refine and react and deploying it using Serverless to an s3 application server bucket. The application is deploying and I am getting the landing page at /index.html, but when I click sign in I get an access denied error. The Auth0 logs say the login was successful but it’s returning a 404. I have added the redirect URL to the allowed URLs and checked it matches the URL in the headers in the network logs. I also have this working fine on my localhost dev machine and the configuration is the same.

1 Like

Hi @andythrive

Welcome to the Auth0 Community!

First of all, thank you for posting your question, and I appreciate the detailed description of the issue you’ve provided. It certainly helps in understanding the situation better. Given the nature of the issue around AWS S3, it seems that the solution may require specific expertise related to AWS configurations.

I recommend reaching out to the AWS S3 community or AWS support, as they have a wealth of knowledge and experience with the S3 configurations and can provide you with more precise and direct assistance for this environment.

Here’s a link to the AWS S3 Forum where you can post your query: AWS S3 Forum


Hi @dawid.matuszczyk

I have contacted AWS and they said it would be am aws issue as the landing page works, so the site is being hosted correctly.

I have played around and proven this is not a Refine issue by creating the most simple react application with only 2 pages and authentication. First I created an application without authentication and it worked, I was able to navigate between the pages. However, when I add authentication, the landing page with the login button shows, but when I click login to call the Auth0 api, I get a Accessed Denied response again. Again, this works on my local machine.

This could still either be auth0 or s3 but I need help from one or both to be able to determine the cause.

Also, I have noticed that the application in the AWS S3 environment is not storing the auth0 cookie tokens. I mentioned this to AWS support and they pointed out that the S3 is nit responsible for storing cookies. That is a browser function. This points me to believe the issue is with Auth0

Maybe this will help you:

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