about summary refs log tree commit diff
path: root/website/sandbox/learnpianochords/src/server/GoogleSignIn.hs
blob: 43fd79fbd61960ad1d611ac083ffd52a5bf675ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--------------------------------------------------------------------------------
module GoogleSignIn where
--------------------------------------------------------------------------------
import Web.JWT
--------------------------------------------------------------------------------

-- | Returns True when the supplied `jwt` meets the following criteria:
-- * The token has been signed by Google
-- * The value of `aud` matches my Google client's ID
-- * The value of `iss` matches is "accounts.google.com" or
--   "https://accounts.google.com"
-- * The `exp` time has not passed
jwtIsValid :: JWT UnverifiedJWT -> Bool
jwtIsValid jwt = False