To extract the userId from the FTSession_s cookie:
var sessionDecoder = new SessionDecoder(‘publicKey’);
var userId = sessionDecoder.extractUuidFromSession();
publicKey - used to verify the session token signature derived from the FTSession_s cookie. Please email: FT Membership Platform Team to obtain the public key.
Extracted FT userId will be returned.
|Missing public key||No public key supplied when instantiating SessionDecoder|
|Missing FTSession_s cookie||No FTSession_s cookie found, thus the user hasn’t logged in.|
|Invalid session - incorrect format||The format of the FTSession_s cookie value is invalid.|
|Signature Verification failed||Either incorrect public key provided or the session token from FTSession_s is invalid|