# \[Archive\] Custom Authentication: Sometimes login error

**URL:** <https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [November 11, 2023, 7:23am UTC](https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695 "2023-11-11T07:23:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chenglin.han](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chenglin.han](https://builder.metamask.io/u/chenglin.han)\
**Post date:** [November 11, 2023, 7:23am UTC](https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695/1 "2023-11-11T07:23:43Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **chenglin.han** on 11/11/2023.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

When asking for help in this category, please make sure to provide the following details:

- SDK Version: 7.1.1
- Platform: iPhone
- Browser Console Screenshots:  

[![281938107-b2d5d218-b5f3-4e3f-a07e-a89cb191cbd7](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/2X/2/25d8e3c2dcd6972c358ec4645b66915770955b4a.png)
281938107-b2d5d218-b5f3-4e3f-a07e-a89cb191cbd7252×553 30 KB
](https://web3auth.io/community/uploads/default/original/2X/2/2037ee3df33ed89936eab9c285115cc6b7b62203.png "281938107-b2d5d218-b5f3-4e3f-a07e-a89cb191cbd7")

→ I am logging in as Custom Authentication using Firebase IdToken, and the basic login works, but sometimes I get a login failure error. What could be the problem?

Config code:

```auto
    adapterSettings: {
      clientId: clientId,
      network: "sapphire_mainnet",
      uxMode: "redirect",
      redirectUrl: "http://localhost:8080/register",
      no3PC: true,
      loginConfig: {
        jwt: {
          verifier: "out verifier name",
          typeOfLogin: "jwt",
          clientId: clientId,
        },
      },
    },

```

Login code:

```auto
const web3authProvider = await web3auth.connectTo('openlogin', {
      loginProvider: "jwt",
      extraLoginOptions: {
        id_token: idToken,
        verifierIdField: "sub",
        domain: "http://localhost:8080/register",
      },
    })

```

---

<div class="post-metadata">

**Author:** ![vjgee](https://avatars.discourse-cdn.com/v4/letter/v/b5e925/32.png) [@vjgee](https://builder.metamask.io/u/vjgee)\
**Post date:** [November 15, 2023, 5:02am UTC](https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695/2 "2023-11-15T05:02:34Z")

</div>

@chenglin.han Thanks for your patience.

Are you still facing this issue ?

---

<div class="post-metadata">

**Author:** ![chenglin.han](https://avatars.discourse-cdn.com/v4/letter/c/edb3f5/32.png) [@chenglin.han](https://builder.metamask.io/u/chenglin.han)\
**Post date:** [November 15, 2023, 5:36am UTC](https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695/3 "2023-11-15T05:36:41Z")

</div>

@vjgee Thank you!

It is difficult to reproduce.  
I have not been able to reproduce it so far, but what are some general possibilities?

Such as:

- Firebase IdToken(JWT) is invalid?
- Web3Auth timeout and throw exception?

---

<div class="post-metadata">

**Author:** ![pepper](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@pepper](https://builder.metamask.io/u/pepper)\
**Post date:** [November 15, 2023, 6:49am UTC](https://builder.metamask.io/t/archive-custom-authentication-sometimes-login-error/1695/4 "2023-11-15T06:49:57Z")

</div>

Hello @chenglin.han  
This system time login error can happening from various reasons,  
first check your system time is same with your UTC time zone.  
also I recommend you to turn off the vpn if it’s running.  
If it still happens then please let me know once more.
