This file contains 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
<?php | |
function namespace_add_auth0_callback_rewrite() { | |
add_rewrite_rule('^auth0/callback$', 'index.php?auth0=1', 'top'); | |
} | |
add_action('init', 'namespace_add_auth0_callback_rewrite'); | |
function namespace_add_auth0_callback_param( $params ) { | |
$params['redirect_uri'] = home_url( '/auth0/callback' ); | |
return $params; | |
} |
This file contains 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
<?php | |
function namespace_add_auth0_callback_rewrite() { | |
add_rewrite_rule('^auth0/callback$', 'index.php?auth0=1', 'top'); | |
} | |
add_action('init', 'namespace_add_auth0_callback_rewrite'); | |
function namespace_add_auth0_callback_param( $params ) { | |
$params['redirect_uri'] = home_url( '/auth0/callback' ); | |
return $params; | |
} |
This file contains 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
<?php | |
// config/laravel-auth0.php | |
return [ | |
// ... | |
// Your Auth0 domain as a URL with a trailing slash. | |
'authorized_issuers' => [ 'https://your-tenant.auth0.com/' ], | |
// The "Identifier" field for the API you created in Auth0. | |
'api_identifier' => 'https://quickstarts/api', | |
// This is the same as the API algorithm. | |
'supported_algs' => [ 'RS256' ], |
This file contains 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
<?php | |
// app/Http/Middleware/CheckJWT.php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Auth0\SDK\JWTVerifier; | |
class CheckJWT { | |
public function handle($request, Closure $next) { |
This file contains 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
/* globals SpreadsheetApp, Browser, CacheService, UrlFetchApp, PropertiesService */ | |
/* | |
* | |
* Macro functions | |
* | |
*/ | |
/** | |
* Prompt the user for a GitHub API token. |
This file contains 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 login (email, password, callback) { | |
console.log(email); | |
var request = require("request"); | |
request.post( | |
"[APP_ENDPOINT_HERE]", | |
{ | |
form: { |
This file contains 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
{ | |
"id": "[REDACTED]", | |
"options": { | |
"mfa": { | |
"active": true, | |
"return_enroll_settings": true | |
}, | |
"passwordPolicy": "[REDACTED]", | |
"enabledDatabaseCustomization": true, | |
"requires_username": true, |
This file contains 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
var wpAuth0LockGlobal = {"settings":{"auth":{"params":{"state":"STATE_VALUE_FROM_AUTH0_STATE_COOKIE","scope":"openid email profile"},"responseType":"code","redirectUrl":"http:\/\/wp.localhost.test\/wp\/index.php?auth0=1","sso":true},"passwordlessMethod":"link","socialButtonStyle":"small","container":"auth0-login-form"},"ready":"1","domain":"joshc-test.auth0.com","clientId":"YOUR_CLIENT_ID","stateCookieName":"auth0_state","nonceCookieName":"auth0_nonce","usePasswordless":"","loginFormId":"auth0-login-form","showAsModal":"","i18n":{"notReadyText":"Auth0 is not configured","cannotFindNodeText":"Auth0 cannot find node with id ","modalButtonText":"Login"}}; |