Стефан Јовановић

01/21/2022, 2:46 PM
Hey people, anyone can help me with Google JWT? So I'm building an Android app, and also there I'm authenticating my users with Google. They authenticate successfully and I get their JWT as a response. Now since I'm also using Ktor for my back-end (where I'm planning to store their profile information), I also need to verify their Google JWT token, before I can store/save their information on my server.. What's the best way to verify my users Google JWT on Ktor server? Is there any API available? 🤔


01/21/2022, 3:10 PM
Someone has been working on a Kotlin JWT validator using Arrow to report all validation errors in the token.

Landry Norris

01/21/2022, 6:53 PM
It's been a minute since I did this, but I once set up the built-in JWT library to accept Google OAuth tokens. I forget exactly what I did, but I vaguely remember getting the secret from the Cloud Console (It uses RSA, not HMAC) and looking up the other parameters. At the very least, I can say for sure its doable with Ktor's built-in JWT verifier.