# Login as patient (paswordless), login as provider (email): issue with nextjs-auth0

**URL:** <https://community.auth0.com/t/login-as-patient-paswordless-login-as-provider-email-issue-with-nextjs-auth0/182131>\
**Category:** Get Help\
**Tags:** sdks-quickstarts, nextjs-auth0\
**Created:** [February 14, 2025, 1:08am UTC](https://community.auth0.com/t/login-as-patient-paswordless-login-as-provider-email-issue-with-nextjs-auth0/182131 "2025-02-14T01:08:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxcarey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/maxcarey/32/71118_2.png) [@maxcarey](https://community.auth0.com/u/maxcarey)\
**Post date:** [February 14, 2025, 1:08am UTC](https://community.auth0.com/t/login-as-patient-paswordless-login-as-provider-email-issue-with-nextjs-auth0/182131/1 "2025-02-14T01:08:51Z")

</div>

I’m using @auth0/nextjs-auth0": “^3.5.0”

In my next app, I have a login for one group of users which I want to be passwordless/sms (patients) and another group (providers), which I want to login as email:

```auto
<Link href="/api/auth/login?connection=sms">
                Patient Login
</Link>
<Link href="/api/auth/login?connection=email">
                Surgeon Login
</Link>

```

The routes are exposed like this:

```auto
// pages/api/auth/[...auth0].ts
import { handleAuth } from "@auth0/nextjs-auth0";
export default handleAuth(); in a file

```

Do I have to pass in the query parameter to handleAuth() function Or maybe in general how can I handle this situation?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [February 14, 2025, 11:11pm UTC](https://community.auth0.com/t/login-as-patient-paswordless-login-as-provider-email-issue-with-nextjs-auth0/182131/3 "2025-02-14T23:11:02Z")

</div>

Hi @maxcarey

You should be able to pass the query parameters to `handleAuth()` or `handleLogin()`.

Let me know if you have any other questions on the matter!

Kind Regards,  
Nik

---

<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:** [February 28, 2025, 11:11pm UTC](https://community.auth0.com/t/login-as-patient-paswordless-login-as-provider-email-issue-with-nextjs-auth0/182131/4 "2025-02-28T23:11:23Z")

</div>

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