# Auth finder authentication using multiple field

**URL:** <https://discourse.cakephp.org/t/auth-finder-authentication-using-multiple-field/2026>\
**Category:** Need Help\
**Created:** [February 9, 2017, 6:13am UTC](https://discourse.cakephp.org/t/auth-finder-authentication-using-multiple-field/2026 "2017-02-09T06:13:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anuj9196](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/anuj9196/32/514_2.png) [@anuj9196](https://discourse.cakephp.org/u/anuj9196)\
**Post date:** [February 9, 2017, 6:13am UTC](https://discourse.cakephp.org/t/auth-finder-authentication-using-multiple-field/2026/1 "2017-02-09T06:13:31Z")

</div>

I have to authenticate user using either email or mobile and password.  
There is no username field in the schema.  
Input fields are

```auto
$this->Form->input('access_key');
$this->Form->input('password');

```

where `access_key` can be either email or mobile

---

<div class="post-metadata">

**Author:** ![Lightbringer](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Lightbringer](https://discourse.cakephp.org/u/Lightbringer)\
**Post date:** [February 11, 2017, 12:37am UTC](https://discourse.cakephp.org/t/auth-finder-authentication-using-multiple-field/2026/2 "2017-02-11T00:37:07Z")

</div>

Looks like you need something like this? Not sure what your question is exactly…

> <https://stackoverflow.com/questions/41928534/custom-finder-not-working-in-cakephp-3>

---

<div class="post-metadata">

**Author:** ![anuj9196](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/anuj9196/32/514_2.png) [@anuj9196](https://discourse.cakephp.org/u/anuj9196)\
**Post date:** [February 11, 2017, 1:14am UTC](https://discourse.cakephp.org/t/auth-finder-authentication-using-multiple-field/2026/3 "2017-02-11T01:14:23Z")

</div>

Exactly same I need. But according to Gaurav’s concern, he has added `username` column in table although it is not required and will always be blank. Same is the case with me, I don’t want to add username column when it is of no use
