# Adding Username/Password Auth Error

**URL:** <https://community.auth0.com/t/adding-username-password-auth-error/96930>\
**Category:** Get Help\
**Tags:** regular-database-connections, connections\
**Created:** [December 21, 2022, 7:56pm UTC](https://community.auth0.com/t/adding-username-password-auth-error/96930 "2022-12-21T19:56:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pabbott](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pabbott/32/33493_2.png) [@pabbott](https://community.auth0.com/u/pabbott)\
**Post date:** [December 21, 2022, 7:56pm UTC](https://community.auth0.com/t/adding-username-password-auth-error/96930/1 "2022-12-21T19:56:30Z")

</div>

I’ll try to be brief. We are using auth0 for login to our site, primarily through the google/social connection type, returning an RS256-based JWT.  
Our data team wants to be able to call the same APIs that our frontend does, via an automated script and a service account. I tried logging into google programmatically but it doesn’t seem like that is well supported anymore.  
I then looked into adding username/password auth, to be used solely internally. I added a database connection type, enabled it in our application, and created a test user. I even verified the user’s email. But, when I go to “sign in as user”, I get back the following error;

Connection type Username-Password-Authentication is not defined in the VALID\_CONNECTIONS array.

I’m open to either a hint as to why u/n auth is not working or a better way to obtain a JWT usable with our API that does not require user interaction (and preferably that won’t need manual intervention when the public keys are rotated)

Thanks,

Patrick Abbott

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [December 22, 2022, 9:41pm UTC](https://community.auth0.com/t/adding-username-password-auth-error/96930/3 "2022-12-22T21:41:03Z")

</div>

Hi @pabbott,

Welcome to the Auth0 Community!

I understand you encountered an error when logging in, specifically with the `"Connection type Username-Password-Authentication is not defined in the VALID_CONNECTIONS array"` error.

After my investigation, I found that you have some Rules enabled that are contributing to this unique error message.

In this case, I recommend that you go to your Rules and include `Username-Password-Authentication` into your VALID\_CONNECTIONS array to solve the issue.

Lastly, you may find our [Call Your API Using Resource Owner Password Flow](https://auth0.com/docs/get-started/authentication-and-authorization-flow/call-your-api-using-resource-owner-password-flow) documentation useful.

I hope this helps!

Please let me know if I can do anything else to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![pabbott](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/pabbott/32/33493_2.png) [@pabbott](https://community.auth0.com/u/pabbott)\
**Post date:** [December 27, 2022, 6:10pm UTC](https://community.auth0.com/t/adding-username-password-auth-error/96930/4 "2022-12-27T18:10:58Z")

</div>

Ah, that’s super obvious now. I should have thought to look through the rules.

Thanks!

---

<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:** [January 10, 2023, 6:11pm UTC](https://community.auth0.com/t/adding-username-password-auth-error/96930/5 "2023-01-10T18:11:35Z")

</div>

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