This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (user, context, callback) { | |
user.app_metadata = user.app_metadata || {}; | |
// Checking if the Auth0 User already has a stripe customer id with it's metadata | |
if ('stripe_customer_id' in user.app_metadata) { | |
console.log(user); | |
return callback(null, user, context); | |
} | |
var stripe = require('stripe')('sk_test_tyd8...'); |