Skip to content

Instantly share code, notes, and snippets.

View leonkyr's full-sized avatar
🎯
Focus

Leo Kyrpychenko leonkyr

🎯
Focus
View GitHub Profile
@leonkyr
leonkyr / slack-auth0.md
Created December 21, 2017 03:46 — forked from woloski/slack-auth0.md
Slack + Auth0
  1. Install the Custom Social Connections extension
  2. Click on the Slack button to install the Slack connection
  3. Enter a Slack Client ID and Secret. To get those go to: https://api.slack.com/apps/new. Fill the fields and pay special attention to the Redirect URI. Enter: https://YOURS.auth0.com/login/callback. See screenshots below.
  4. Click on App Credentials on the left and copy the Client ID and Client Secret and paste them on the Auth0 dashboard
  5. Click Save and then try the flow using the Try button. You should get back the full profile from Slack, including email, team and avatars.

Note: you can change the scopes on the Scope field on Auth0 and include any of these: https://api.slack.com/docs/oauth-scopes

You can now use the Slack connection using any Auth0 client library. Example:

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@leonkyr
leonkyr / README.md
Created September 26, 2016 22:43 — forked from dvdsmpsn/README.md
Google Analytics Setup for Atlassian Cloud Add-Ons

Google Analytics Setup for Atlassian Cloud Add-Ons

Add analytics.js to your add-on pages. Update the tracking code and Add-On / Macro Name and you should be good to go.

Custom Dimensions

You'll need to add some custom dimensions in Google Analytics. Use the names in comments in the section of analytics.js below // Add into custom dimensions

Personally Identifiable Information (PII)

Note that you must not store PII such as user_id which is sent over to Google Analytics in every request as a request parameter. Note userKey is not PII, so can be used.