function (user, context, callback) { // Check if user is logging into app1 if (context.clientName === 'app1') { context.clientID = 'app1_client_id'; context.clientSecret = 'app1_client_secret'; // Add any other app1 specific configurations here }
// Check if user is logging into app2 if (context.clientName === 'app2') { context.clientID = 'app2_client_id'; context.clientSecret = 'app2_client_secret'; // Add any other app2 specific configurations here } callback(null, user, context); }