serverless-jwt icon indicating copy to clipboard operation
serverless-jwt copied to clipboard

Mapping of Properties to Netlify Nomenclature

Open jamesqquick opened this issue 4 years ago • 0 comments

The nomenclature in referencing access tokens in Netlify functions using Netlify identity is a bit different.

Netlify attaches a clientContext property to the Netlify Function context instead of an identityContext. Additionally, Netlify attaches a user property to the clientContext vs a claims object.

image

Would it be worth updating the properties in the @serverless-jwt/netlify package to match? This way validation will occur in the same way regardless of where the tokens come from.

In summary...

  • identityContext becomes clientContext
  • claims becomes user

jamesqquick avatar Aug 12 '20 16:08 jamesqquick