import wixUsersBackend from 'wix-users-backend'; import {fetch} from 'wix-fetch'; const CLIENT_ID = '1112811133259218974'; const CLIENT_SECRET = 'MorYUCBU0MLMKdAnkggpOxon-GaXSbLG'; const REDIRECT_URI = ''; // Handles the authentication callback export function myApp_auth_callback(request) { const code = request.query.code; const tokenEndpoint = ``; const payload = { grant_type: 'authorization_code', code, redirect_uri: REDIRECT_URI }; const options = { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': `Basic ${Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64')}` }, body: Object.keys(payload) .map(key => encodeURIComponent(key) + '=' + encodeURIComponent(payload[key])) .join('&') }; return fetch(tokenEndpoint, options) .then(response => response.json()) .then(data => { const accessToken = data.access_token; // Use the access token to authenticate the user and handle the login logic here // e.g., create a session for the authenticated user // wixUsersBackend.createSession() }); }
top of page
  • jerry

Stuff I Consumed This Week #SITC1

“These days, there are many more deep intellectuals in the business, and that, coupled with the explosion of information on the Internet, creates the illusion that there is an explanation for everything and that the primary task is simply to find that explanation. As a result, technical analysis is at the bottom of the study list for many of the younger generation, particularly since the skill often requires them to close their eyes and trust the price action.”

Paul Tudor Jones

Comments from me: Although I do read, listen and watch all of the below media it should be noted that sometimes the relevancy for me may be different than it’s relevancy to you. The best way that I can highlight this is the company write ups. I’m often not at all interested in whatever company I’m reading about. It rarely fits my style, what I’m reading for is to find new ways to think about and evaluate companies. My best piece of advice with this series is to find your why. Why are you reading something, what’s your goal with listening to a podcast etc. Active learning is the goal. With that being said here is the first edition, I hope you find at least one piece of media you find interesting.

Must Reads:

In every edition I will share many links. Here are the few that I found particularly useful.

1) Earnings, Cash Flow and Free Cash Flows: A Primer

(Source: Aswath Damodaran)