# Authenticating using serverless s3 application server

**URL:** <https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [October 31, 2023, 4:36pm UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880 "2023-10-31T16:36:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andythrive](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andythrive/32/33385_2.png) [@andythrive](https://community.auth0.com/u/andythrive)\
**Post date:** [October 31, 2023, 4:36pm UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/1 "2023-10-31T16:36:50Z")

</div>

Hi

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.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [October 31, 2023, 5:51pm UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/2 "2023-10-31T17:51:06Z")

</div>

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](https://repost.aws/topics/TA4h-jxxJrRJStoIIHfQySkA/serverless%3Fsc_ichannel=ha&sc_ilang=en&sc_isite=repost&sc_iplace=hp&sc_icontent=TA4h-jxxJrRJStoIIHfQySkA&sc_ipos=0)

Thanks  
Dawid

---

<div class="post-metadata">

**Author:** ![andythrive](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andythrive/32/33385_2.png) [@andythrive](https://community.auth0.com/u/andythrive)\
**Post date:** [November 1, 2023, 8:03am UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/3 "2023-11-01T08:03:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andythrive](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/andythrive/32/33385_2.png) [@andythrive](https://community.auth0.com/u/andythrive)\
**Post date:** [November 1, 2023, 8:55am UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/4 "2023-11-01T08:55:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![necatiozmen](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/necatiozmen/32/52436_2.png) [@necatiozmen](https://community.auth0.com/u/necatiozmen)\
**Post date:** [November 14, 2023, 9:20pm UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/5 "2023-11-14T21:20:52Z")

</div>

Maybe this will help you:

> <https://stackoverflow.com/questions/64001221/react-app-spa-on-s3-aws-while-refreshing-the-page-shows-404-page>

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 28, 2023, 9:21pm UTC](https://community.auth0.com/t/authenticating-using-serverless-s3-application-server/119880/6 "2023-11-28T21:21:29Z")

</div>

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