async function getStripeConnectTokenData(encodedData, getSessionProp) {
    const data = JSON.parse(Buffer.from(encodedData, 'base64').toString());

    const state = await getSessionProp(STATE_PROP);

    if (state !== data.s) {
        throw new errors.NoPermissionError({message: tpl(messages.incorrectState)});
    }

    return {
        public_key: data.p,
        secret_key: data.a,
        livemode: data.l,
        display_name: data.n,
        account_id: data.i
    };
}
@function getStripeConnectTokenData
@desc Returns the api keys and the livemode for a Stripe Connect integration after validating the state.

@param {string} encodedData - A string encoding the response from Stripe Connect
@param {(prop: string) => Promise<any>} getSessionProp - A function to retrieve data from the current session

@returns {Promise<{secret_key: string, public_key: string, livemode: boolean, display_name: string, account_id: string}>}