# Username-Password-Authentication errors

**URL:** <https://community.auth0.com/t/username-password-authentication-errors/59041>\
**Category:** Get Help\
**Tags:** api, auth0, login\
**Created:** [March 8, 2021, 3:17am UTC](https://community.auth0.com/t/username-password-authentication-errors/59041 "2021-03-08T03:17:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![skydiver](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/skydiver/32/28053_2.png) [@skydiver](https://community.auth0.com/u/skydiver)\
**Post date:** [March 8, 2021, 3:17am UTC](https://community.auth0.com/t/username-password-authentication-errors/59041/1 "2021-03-08T03:17:06Z")

</div>

Hello,

I’ve setup a new auth0 account, make all the application/api setup, but when i try to login with the user/password authentication, i get this error:

```auto
{
  "error": "access_denied",
  "error_description": "secretOrPrivateKey must have a value"
}

```

I was able to create a new user without problems, it’s just when trying to login.

I get this error by testing with a valid user on:  
`Connections > Database > Username-Password-Authentication > Try Connection`

Here is the result:

 ![Screen Shot 2021-03-08 at 00.11.52](https://global.discourse-cdn.com/auth0/original/3X/0/8/081d218a3d3d86118425d806b524282bd962e2df.png)

I’ve tested with a node/express example and i get the same result.

I have a different account (for another customer) who works fine, so, maybe i’m missing some configuration.

I can’t find any solution on the forum or google looking for `secretOrPrivateKey`.

Thanks.-

---

<div class="post-metadata">

**Author:** ![supun](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/supun/32/17069_2.png) [@supun](https://community.auth0.com/u/supun)\
**Post date:** [March 8, 2021, 7:15am UTC](https://community.auth0.com/t/username-password-authentication-errors/59041/2 "2021-03-08T07:15:49Z")

</div>

Hi @skydiver ,

Welcome to Auth0 Community!

Is this happening after the user enters their credentials or just after when you click “Try Connection”? Does this happen when your test is involving an actual application instead of the “Try Connection” option?

Additionally, do you have any rules set up that do something related to JWT? If so, can you try again after disabling that rule?

Let us know your observations. Thank you!

---

<div class="post-metadata">

**Author:** ![skydiver](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/skydiver/32/28053_2.png) [@skydiver](https://community.auth0.com/u/skydiver)\
**Post date:** [March 8, 2021, 2:52pm UTC](https://community.auth0.com/t/username-password-authentication-errors/59041/3 "2021-03-08T14:52:36Z")

</div>

Hey @supun, thanks for the reply

**I found the issue** ; there was a missing env variable for a rule.

This confuses me because in the other client account was working fine so i thought it was a generic auth0 error message, but was the code of the rule.

Your comments served as inspiration to enable/disable rules and start looking the code.

Thanks again.

---

<div class="post-metadata">

**Author:** ![supun](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/supun/32/17069_2.png) [@supun](https://community.auth0.com/u/supun)\
**Post date:** [March 9, 2021, 7:41am UTC](https://community.auth0.com/t/username-password-authentication-errors/59041/4 "2021-03-09T07:41:42Z")

</div>

Glad to hear you were able to find the error. Happy to help. 🙂

---

<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:** [March 24, 2021, 7:42am UTC](https://community.auth0.com/t/username-password-authentication-errors/59041/5 "2021-03-24T07:42:05Z")

</div>

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