rp
12/19/2021, 6:31 PMlegolas8911
12/20/2021, 2:16 PMverifySession
middleware one level higher. jwt.io correctly decodes everything but jsonwebtokens
decode always returns null. I have enabled the JWT recipe so I have the jwk endpoint available but I don't know what to do with that data/if I need it. Thanks!rp
12/20/2021, 2:41 PMverifySession
, you don't need to verify the access token yourself manually.rp
12/20/2021, 2:42 PMlegolas8911
12/20/2021, 2:58 PMverifySession
) but then I'm passing the JWT forward to the federated GQL servers and I would like to validate the token there as well for an added layer of security. Since it's a different lambda function I can't use verifySession
. I thought maybe it's possible to decode/validate the JWT on the federated service by using the jwt/jwk.json
GET request or something, but JWKs are a big unknown to merp
12/20/2021, 3:00 PMrp
12/20/2021, 3:01 PMrp
12/20/2021, 3:01 PMrp
12/20/2021, 3:02 PMenable: true,
to the session recipe, it internally initialises the JWT recipe.legolas8911
12/20/2021, 3:06 PMlegolas8911
12/20/2021, 3:07 PMlegolas8911
12/20/2021, 3:08 PMjwt/jwk.json
GET was not available until I enabled the JWT recipe, even though I have Session already. L.E. oh, I think you;re referring to the newly released feature, nevermindrp
12/20/2021, 3:15 PMlegolas8911
12/20/2021, 3:17 PMenable: true
. I see some commits that might reference some work about this feature in the 8.4 branch but that hasn't been releasedrp
12/20/2021, 3:18 PMrp
12/20/2021, 3:18 PMrp
12/20/2021, 3:19 PMts
Session.init({
jwt: {
enable: true,
},
});
legolas8911
12/20/2021, 3:20 PMreturn {
framework: 'express' as const,
supertokens: {
connectionURI: process.env.SUPERTOKENS_CONNECTION_URI as string,
apiKey: process.env.SUPERTOKENS_API_KEY as string,
},
appInfo: {
appName: 'xxx',
apiDomain: process.env.API_DOMAIN as string,
websiteDomain: 'https://www.xxx.io',
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
Github({
clientId: 'xxx',
clientSecret: 'xxx',
scope: ['read:user', 'user:email', 'repo'],
}),
],
}),
Session.init({
cookieDomain: '.xxx.io',
cookieSameSite: 'none',
jwt: {
enable: true,
},
}),
JWT.init(),
],
isInServerlessEnv: true,
};
legolas8911
12/20/2021, 3:20 PMlegolas8911
12/20/2021, 3:20 PMArgument of type '{ cookieDomain: string; cookieSameSite: "none"; jwt: { enable: boolean; }; }' is not assignable to parameter of type 'TypeInput'.
Object literal may only specify known properties, and 'jwt' does not exist in type 'TypeInput'.ts(2345)
rp
12/20/2021, 3:21 PMlegolas8911
12/20/2021, 3:22 PMrp
12/20/2021, 3:22 PMuser
12/22/2021, 2:05 PMrp
12/22/2021, 2:07 PMuser
12/22/2021, 2:10 PMKillian
12/23/2021, 2:06 AMrp
12/23/2021, 4:48 AMKillian
12/24/2021, 5:31 AMrp
12/24/2021, 5:31 AM