Skip to content

Instantly share code, notes, and snippets.

View hadrien's full-sized avatar

Hadrien David hadrien

View GitHub Profile
@hadrien
hadrien / logto-getCustomJwtClaims.js
Last active April 26, 2025 16:54
Logto.io - getCustomJwtClaims: Set up custom claims in the access token. These claims can be used to pass additional information to your application.
/**
* logto.io
* This function is called during the access token generation process to get custom claims for the JWT token.
* Limit custom claims to under 50KB. It requests custom claims to an api configured by 2 environment variables:
* apiKey and apiUrl
*
* @param {Object} payload - The input payload of the function.
* @param {AccessTokenPayload} payload.token -The JWT token.
* @param {Context} payload.context - Logto internal data that can be used to pass additional information
* @param {EnvironmentVariables} [payload.environmentVariables] - The environment variables.
@hadrien
hadrien / keybase.md
Created September 30, 2014 11:44
keybase.io verification

Keybase proof

I hereby claim:

  • I am hadrien on github.
  • I am hadrien (https://keybase.io/hadrien) on keybase.
  • I have a public key whose fingerprint is E050 BE98 1903 CF78 56AD 40EC B4BB C898 A629 1E1F

To claim this, I am signing this object: