Skip to content

Instantly share code, notes, and snippets.

View woloski's full-sized avatar

Matias Woloski woloski

View GitHub Profile
@woloski
woloski / rule-map-email-to-nameid.js
Last active February 9, 2023 10:37
Salesforce Auth0 rule. This is the default mapping Auth0 will use for Salesforce. You can create a new Rule and change this with whatever you want.
function (user, context, callback) {
//
// this rule can be used if you have chosen to use Username as the way to identify a user in Salesforce. Notice that we are mapping the email to the nameidentifier.
//
if (context.clientName === 'Salesforce') {
context.samlConfiguration.mappings = {
'http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier': 'email',
'User.Username': 'email',
'User.Email': 'email',
'User.FirstName': 'given_name',
@woloski
woloski / server.js
Created February 4, 2014 14:17
jwt and social auth
app.get('/auth/facebook/callback',
passport.authenticate('facebook', { failureRedirect: '/error', session: false }),
function(req, res) {
var token = jwt.sign(req.user, secret, { expiresInMinutes: 60*5 });
res.redirect('/#jwt=' + jwt);
});
@woloski
woloski / always-looking-for-talent.md
Last active August 29, 2015 13:56
We don't hire on-demand, we continously look for great people

Auth0 is a privately-held tech company based in Seattle, WA. We have a distributed team working remotely from Seattle, Buenos Aires and Cordoba.

We're building the company we always wanted, with people who share the same passion for technology, solutions and customers.

We continously look for:

### Keybase proof
I hereby claim:
* I am woloski on github.
* I am woloski (https://keybase.io/woloski) on keybase.
* I have a public key whose fingerprint is 0224 1D50 4856 D763 441F 190D F00A 7305 01D0 FA5F
To claim this, I am signing this object:
@woloski
woloski / 0_reuse_code.js
Created April 13, 2014 20:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@woloski
woloski / updateconn
Last active August 29, 2015 14:06
update a connection and its config
PUT https://YOUR-ACCOUNT.auth0.com/api/connections/YOUR-CONNECTION-NAME
content-type: application/json
authorization: Bearer ACCESS-TOKEN
{
"options": {
"bareConfiguration": {
"test": "foo3"
},
"enabledDatabaseCustomization":true,
@woloski
woloski / README.md
Last active August 29, 2015 14:07
Go + Auth0

Install deps

go get github.com/gorilla/mux
go get github.com/astaxie/beego/session

Run

@woloski
woloski / README.md
Created October 13, 2014 15:53
Authenticate with Google through Auth0 and refresh the access token from Browser
  1. Create a Client ID and an API Key on Google API Console. Set the Allowed Origins (e.g. localhost:3000).
  2. Create an app in Auth0 and set the Allowed Origins (e.g. localhost:3000) and the callback to https://yours.auth0.com/mobile

@woloski
woloski / multitenant.md
Last active February 11, 2024 23:14
Multi Tenant Apps in Auth0

Multitenancy refers to a principle in software architecture where a single instance of the software runs on a server, serving multiple client-organizations (tenants)

Let's start by enumerating some multi tenant applications and understand how they handle it.

Slack

Authentication:

@woloski
woloski / option1-prose.md
Last active August 29, 2015 14:08
Which style would you prefer for a blog post?

Why developers fall in love with your product?

1. Awesome docs

What do we do the first time we want to use a library? We read the Github README or the Wiki. Why? First and foremost, because we can do what we know best: Copy & Paste code snippets. Also, it gives us an overview of how we can use the library and the APIs it has. If the APIs weren’t good, we’d just search for another one.

Products should follow this same idea. We should have documentation from which we can copy and paste. For a product, that means tailored documentation for every user.

Another thing we love is reading code. It’s literature for us!That’s why it’s nice if every document includes an up-to-date sample for every major platform/technology that we can just download, run locally and read its code.