# Stuck with " Unable to authenticate you "

**URL:** <https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772>\
**Category:** Help me!\
**Created:** [June 7, 2022, 9:47am UTC](https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772 "2022-06-07T09:47:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucas\_Scariot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/lucas_scariot/32/4597_2.png) [@Lucas\_Scariot](https://community.forestadmin.com/u/Lucas_Scariot)\
**Post date:** [June 7, 2022, 9:47am UTC](https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772/1 "2022-06-07T09:47:15Z")

</div>

## Feature(s) impacted

Authentication

## Observed behavior

We’re currently stuck and nobody from the team can login, in all environments

## Expected behavior

Login

## Failure Logs

 ![Screenshot 2022-06-07 at 11.38.06](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/b/be19fb238f829353634fe786ab8b23dd07f11645.png)

The liana returns a 200 code on authentication  
Then this request fails: [http://localhost/forest/authentication/callback?code=...&state=](http://localhost/forest/authentication/callback?code=...&state=)…

 ![Screenshot 2022-06-07 at 11.44.49](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/c/ced0c3e2fc4ec0a9246887581bcf140d6e8aead8.png)

Why a request in sent to localhost ?

## Context

> Please provide in this **mandatory section** , the relevant information about your configuration:

- Project name: Bits
- Team name: Operations
- Environment name: Production
- Agent type & version: 7.0.0

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [June 7, 2022, 9:59am UTC](https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772/2 "2022-06-07T09:59:41Z")

</div>

Hello @Lucas_Scariot! Welcome to our community. 🎊

We can see a CORS issue on the **/forest/authentication/callback** route and it calls localhost instead of your actual backend URL. This is probably due to a misconfigured **APPLICATION\_URL**.

Can you check that the **APPLICATION\_URL** environment variable matches your actual backend URL?

Let me know if it helps. 🙏

Kind regards,  
Morgan

---

<div class="post-metadata">

**Author:** ![Lucas\_Scariot](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/lucas_scariot/32/4597_2.png) [@Lucas\_Scariot](https://community.forestadmin.com/u/Lucas_Scariot)\
**Post date:** [June 7, 2022, 10:47am UTC](https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772/3 "2022-06-07T10:47:27Z")

</div>

APPLICATION\_URL was missing indeed, thanks for the answer !  
It could be interesting to have warning / error messages when an environment variable is missing !

Thanks again

---

<div class="post-metadata">

**Author:** ![morganperre](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/morganperre/32/1296_2.png) [@morganperre](https://community.forestadmin.com/u/morganperre)\
**Post date:** [June 7, 2022, 12:12pm UTC](https://community.forestadmin.com/t/stuck-with-unable-to-authenticate-you/4772/4 "2022-06-07T12:12:20Z")

</div>

Hey again @Lucas_Scariot,

You’re welcome.

Indeed, I will push your feedback to our team to improve our experience in the future.

Kind regards,  
Morgan
