# \[Archive\] Passwordless no modal SDK won't login users when redirect\_uri is provided

**URL:** <https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [December 5, 2024, 10:34am UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132 "2024-12-05T10:34:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![iurii](https://avatars.discourse-cdn.com/v4/letter/i/22d042/32.png) [@iurii](https://builder.metamask.io/u/iurii)\
**Post date:** [December 5, 2024, 10:34am UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132/1 "2024-12-05T10:34:22Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **iurii** on 12/5/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

- **SDK Version** (package.json): 8.6.1
- **Platform** : Web
- **Browser Console Screenshots** :
- If the issue is related to Custom Authentication, please include the following information (optional):
  - Verifier Name: Google
  - JWKS Endpoint:
  - Sample idToken (JWT): eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcnVzLXRlc3QuYXV0aDAuY29tLyIsImF1ZCI6ImQ4NGY2eHZiZFY3NVZUR21IaU1XZlpMZVNQazhNMDdDIiwibmFtZSI6Iml1cmlpQG5ldmVybWluZWQuaW8iLCJlbWFpbCI6Iml1cmlpQG5ldmVybWluZWQuaW8iLCJpYXQiOjE3MzMzOTE0OTYsImVhdCI6MTczMzM5MTc5NiwiZXhwIjoxNzMzMzkxNzk2fQ.QE5aoiEbxDvQL3dd5Mj\_tBqvisR7zmo9YYu2wYQYRW8m1HzLMzcbEo8p5Xyd-fV1z-gF0l5A8SiNjnWlTi0WiA

```auto
web3Auth.instance.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
        loginProvider: LOGIN_PROVIDER.EMAIL_PASSWORDLESS,
        extraLoginOptions: {
          login_hint: emailOrPhone,
          name: 'Email',
          redirect_uri: window.location.href,
        },
      })

```

When user logs in using passwordless method (email/mobile) on this page with a URL param such as `/login?test=param` after the redirect from web3auth he gets redirected back to this page `/login?test=param#id_token=eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL3RvcnVzLXRlc3QuYXV0aDAuY29tLyIsImF1ZCI6ImQ4NGY2eHZiZFY3NVZUR21IaU1XZlpMZVNQazhNMDdDIiwibmFtZSI6Iml1cmlpQG5ldmVybWluZWQuaW8iLCJlbWFpbCI6Iml1cmlpQG5ldmVybWluZWQuaW8iLCJpYXQiOjE3MzMzOTE0OTYsImVhdCI6MTczMzM5MTc5NiwiZXhwIjoxNzMzMzkxNzk2fQ.QE5aoiEbxDvQL3dd5Mj_tBqvisR7zmo9YYu2wYQYRW8m1HzLMzcbEo8p5Xyd-fV1z-gF0l5A8SiNjnWlTi0WiA`, but web3auth won’t authenticate user and he stays unauthenticated.

If I remove the `redirect_uri` then the user gets redirected back without any URL parameters although he becomes authenticated, but I need the URL params to be present.

I don’t know where to whitelist the callback URLs since I use Google verifier and there are no such settings or I cannot find them.

What could be the issue with the redirect\_uri? There are no errors in the console and I’m not sure how to debug the issue.

---

<div class="post-metadata">

**Author:** ![w3abot](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@w3abot](https://builder.metamask.io/u/w3abot)\
**Post date:** [December 5, 2024, 10:35am UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132/2 "2024-12-05T10:35:07Z")

</div>

Hi Iurii Tankievych,

Thank you for sharing the details about the issue you’re facing with the PnP Web SDK (version 8.6.1) on the Web platform. I understand that you’re experiencing problems with the passwordless login method when a `redirect_uri` is provided.

Here’s a summary of the information you’ve provided that will help our support team address your issue:

- **SDK Details** : PnP Web SDK
- **SDK Version** : 8.6.1
- **Platform** : Web
- **Login Provider** : Email Passwordless
- **Redirect URI** : `window.location.href`
- **Verifier Name** : nvm-testnet-google-verifier
- **Sample idToken (JWT)**: Provided in your message

### Code Snippet

```javascript
web3Auth.instance.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
  loginProvider: LOGIN_PROVIDER.EMAIL_PASSWORDLESS,
  extraLoginOptions: {
    login_hint: emailOrPhone,
    name: 'Email',
    redirect_uri: window.location.href,
  },
})

```

### Issue Description

Users are redirected back to `/login?test=param#id_token=...` after using the passwordless method with the `redirect_uri`, but they remain unauthenticated. When the `redirect_uri` is removed, users get redirected back without any URL parameters but successfully authenticate.

### Proposed Solution

Please check if the `redirect_uri` that you are providing is whitelisted in your Web3Auth configuration. Sometimes, the platform requires that any redirect URIs used must be explicitly configured to prevent unauthorized redirection.

If you’re still facing issues, consider trying different URLs or checking if any other potential configurations in your Web3Auth setup might be affecting the behavior.

If the problem persists, it would be helpful to gather any additional information from your browser console or try to debug using network activity when the redirection occurs.

I hope this helps you in diagnosing the issue further! If you have any more information or need additional assistance, feel free to share. Your input is valuable, and we’re here to support you!

> Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

---

<div class="post-metadata">

**Author:** ![iurii](https://avatars.discourse-cdn.com/v4/letter/i/22d042/32.png) [@iurii](https://builder.metamask.io/u/iurii)\
**Post date:** [December 10, 2024, 9:36am UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132/3 "2024-12-10T09:36:56Z")

</div>

The proposed solution doesn’t help because I have nowhere to configure the redirect URIs, as I mentioned we use Google Verifier and there are no such settings, where else can I configure them?

---

<div class="post-metadata">

**Author:** ![aitor](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/aitor/32/1599_2.png) [@aitor](https://builder.metamask.io/u/aitor)\
**Post date:** [December 13, 2024, 4:27pm UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132/4 "2024-12-13T16:27:47Z")

</div>

We are still having this issue. Any update?

---

<div class="post-metadata">

**Author:** ![yashovardhan](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/yashovardhan/32/1526_2.png) [@yashovardhan](https://builder.metamask.io/u/yashovardhan)\
**Post date:** [December 24, 2024, 9:07am UTC](https://builder.metamask.io/t/archive-passwordless-no-modal-sdk-wont-login-users-when-redirect-uri-is-provided/1132/5 "2024-12-24T09:07:55Z")

</div>

Hey @iurii

If you specify the redirect url in the auth adapter params, it will preserve the url params. Please remove the `redirect_uri` from your extraLoginOptions.

Try something similar to this:

```auto
const authadapter = new AuthAdapter({
  adapterSettings: {
    replaceUrlOnRedirect: true,
    uxMode: "redirect",
    redirectUrl: "http://localhost:5173/?abcdeh=askjhd",
  }
});

```
