Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Wanny Miarelli wannymiarelli

🏠
Working from home
View GitHub Profile
@wannymiarelli
wannymiarelli / app.js
Last active Dec 21, 2017
Auth0 ExpressJS
View app.js
const express = require('express');
const bodyParser = require('body-parser');
const axios = require('axios');
const app = express();
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
/*
View AppServiceProvider.php
<?php
namespace App\Providers;
use App\Services\TenantManager;
use App\Tenant;
use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;
class AppServiceProvider extends ServiceProvider
View LoginController.php
<?php
public function login (Request $request) {
$client = \DB::table('oauth_clients')
->where('password_client', '=', true)
->first();
// more login logci
}