Skip to main content
Version: 7.2.X

Overriding Functions

Main interface#

export interface RecipeInterface {    /*    * Called to create a signed JWT    *     * @params:     *   - payload: (Optional) Object containing custom claims that shuld be included in the JWT payload    *   - validitySeconds: (Optional) Time in seconds for which the JWT should be considered valid.    *                      if this is undefined, the validity provided to the init function is used    *     * @returns "OK" and the JWT if succesfull. "UNSUPPORTED_ALGORITHM_ERROR" if an unsupported signing algorithm is used    */    createJWT(input: {        payload?: any;        validitySeconds?: number;    }): Promise<        | {              status: "OK";              jwt: string;          }        | {              status: "UNSUPPORTED_ALGORITHM_ERROR";          }    >;
    /*    * Called to retrieve a list of JWKs that can be used for JWT verification    *     * @returns "OK" and an array of keys (refer to JsonWebKey below for typedef)    */    getJWKS(): Promise<{        status: "OK";        keys: JsonWebKey[];    }>;}

Supporting Types#

export type JsonWebKey = {    kty: string;    kid: string;    n: string;    e: string;    alg: string;    use: string;};
What type of UI do you want to use?
Custom UI
Pre built UI