Discord is migrating to discord.com, including their OAuth2 API routes. Support for the old domain, discordapp.com, will be dropped on 7 Nov 2020.
Note that the cdn.discordapp.com domain is unchanged. This is intentional, as the cdn domain will not be migrated due to technical restraints on Discord's side.
I was getting this error due to it being a string value.
```sh
[next-auth][error][jwt_session_error] JWTClaimInvalid: "auth_time" claim must be a JSON numeric value
at isTimestamp (/Users/alex/code/trufans/node_modules/jose/lib/jwt/verify.js:24:11)
at validateTypes (/Users/alex/code/trufans/node_modules/jose/lib/jwt/verify.js:159:3)
at Object.module.exports [as verify] (/Users/alex/code/trufans/node_modules/jose/lib/jwt/verify.js:236:3)
at Object.<anonymous> (/Users/alex/code/trufans/node_modules/next-auth/dist/lib/jwt.js:100:30)
at Generator.next (<anonymous>)
at asyncGeneratorStep (/Users/alex/code/trufans/node_modules/next-auth/dist/lib/jwt.js:22:103)
at _next (/Users/alex/code/trufans/node_modules/next-auth/dist/lib/jwt.js:24:194)
at /Users/alex/code/trufans/node_modules/next-auth/dist/lib/jwt.js:24:364
at new Promise (<anonymous>)
at Object.<anonymous> (/Users/alex/code/trufans/node_modules/next-auth/dist/lib/jwt.js:24:97) {
code: 'ERR_JWT_CLAIM_INVALID',
claim: 'auth_time',
reason: 'invalid'
}
```
Currently the Google Provider example will always fail due to checking for `email_verified` when the correct response from the server is `verified_email`
next-auth debug output for validation:
```
[next-auth][debug][profile_data] {
id: 'XXXXXXX',
email: 'nick@example',
verified_email: true,
name: 'Nick Parks',
given_name: 'Nick',
family_name: 'XXXX',
picture: 'XXXX,
locale: 'en',
hd: 'example.com'
}
```
This isn't technically required (it is working fine currently) but if we specify the type explicitly it should help avoid any problems in future that might be introduced with refactoring.