Search code examples
kotlintokenktor

GoogleIdTokenVerifier verifier return null


I use...

try {
        val verifier = GoogleIdTokenVerifier.Builder(NetHttpTransport(), GsonFactory())
            .setAudience(listOf(AUDIENCE))
            .setIssuer(ISSUER)
            .build()
        verifier.verify(tokenId)
    }catch (e : Exception) {
        e.printStackTrace()
        null
    }

to verify google token id.. but verify function return nothing and catch block runs..

And this message is displayed...

click to see error

The token is valid and also I used VPN but the result was still the same And also I use localhost

The solutions I saw and used

  1. Using VPN and DNS
  2. use accounts.google.com Instead https://accounts.google.com

Thank you if you have a solution


Solution

  • The problem was solved...

    Solution: Use another VPN and the problem is solved