<commit_before>---
title: Getting started with Auth0
url: /
---

<script type="text/javascript">
  // IE8/9 SHIM
  if (!window.location.origin) {
    window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
  }
</script>

<script type="text/javascript">

  // Redirect old `/#!/..` urls to new `/quickstart/...`
  var pathname = window.location.pathname || '/';
  var hash = window.location.hash;
  var regex = /^\#\!\//;
  if ('/' === pathname && regex.test(hash)) {
    window.location = window.location.origin + hash.replace(regex, '/quickstart/');
  };

</script>


# Getting started with Auth0

Hello@@account.userName ? ' ' + account.userName : ''@@! Ready to test drive Auth0? All tutorials have been tailored to your account. So in most cases, all you need to do is copy the code snippets and paste them into your projects and tools.

<div class="row getting-started-logos clearfix">
  <div id="navigator-container" class="col-sm-12"></div>
</div>


<script src="https://cdn.auth0.com/tutorial-navigator/latest/build.min.js" type="text/javascript"></script>
<link href="https://cdn.auth0.com/tutorial-navigator/latest/build.min.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript">
  (function(){function r(e,t){if("function"==typeof e){return r("*",e)}if("function"==typeof t){var n=new o(e);for(var i=1;i<arguments.length;++i){r.callbacks.push(n.middleware(arguments[i]))}}else if("string"==typeof e){r.show(e,t)}else{r.start(e)}}function i(e){var t=window.location.pathname+window.location.search;if(t==e.canonicalPath)return;r.stop();e.unhandled=true;window.location=e.canonicalPath}function s(e,n){if("/"==e[0]&&0!=e.indexOf(t))e=t+e;var r=e.indexOf("?");this.canonicalPath=e;this.path=e.replace(t,"")||"/";this.title=document.title;this.state=n||{};this.state.path=e;this.querystring=~r?e.slice(r+1):"";this.pathname=~r?e.slice(0,r):e;this.params=[];this.hash="";if(!~this.path.indexOf("#"))return;var i=this.path.split("#");this.path=i[0];this.hash=i[1]||"";this.querystring=this.querystring.split("#")[0]}function o(e,t){t=t||{};this.path=e;this.method="GET";this.regexp=u(e,this.keys=[],t.sensitive,t.strict)}function u(e,t,n,r){if(e instanceof RegExp)return e;if(e instanceof Array)e="("+e.join("|")+")";e=e.concat(r?"":"/?").replace(/\/\(/g,"(?:/").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,function(e,n,r,i,s,o){t.push({name:i,optional:!!o});n=n||"";return""+(o?"":n)+"(?:"+(o?n:"")+(r||"")+(s||r&&"([^/.]+?)"||"([^/]+?)")+")"+(o||"")}).replace(/([\/.])/g,"\\$1").replace(/\*/g,"(.*)");return new RegExp("^"+e+"$",n?"":"i")}function a(e){if(e.state){var t=e.state.path;r.replace(t,e.state)}}function f(e){if(1!=l(e))return;if(e.metaKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;var n=e.target;while(n&&"A"!=n.nodeName)n=n.parentNode;if(!n||"A"!=n.nodeName)return;var i=n.getAttribute("href");if(n.pathname==location.pathname&&(n.hash||"#"==i))return;if(i.indexOf("mailto:")>-1)return;if(n.target)return;if(!c(n.href))return;var s=n.pathname+n.search+(n.hash||"");var o=s+n.hash;s=s.replace(t,"");if(t&&o==s)return;e.preventDefault();r.show(o)}function l(e){e=e||window.event;return null==e.which?e.button:e.which}function c(e){var t=location.protocol+"//"+location.hostname;if(location.port)t+=":"+location.port;return 0==e.indexOf(t)}var e=true;var t="";var n;r.callbacks=[];r.base=function(e){if(0==arguments.length)return t;t=e};r.start=function(t){t=t||{};if(n)return;n=true;if(false===t.dispatch)e=false;if(false!==t.popstate)window.addEventListener("popstate",a,false);if(false!==t.click)window.addEventListener("click",f,false);if(!e)return;var i=location.pathname+location.search+location.hash;r.replace(i,null,true,e)};r.stop=function(){n=false;removeEventListener("click",f,false);removeEventListener("popstate",a,false)};r.show=function(e,t,n){var i=new s(e,t);if(false!==n)r.dispatch(i);if(!i.unhandled)i.pushState();return i};r.replace=function(e,t,n,i){var o=new s(e,t);o.init=n;if(null==i)i=true;if(i)r.dispatch(o);o.save();return o};r.dispatch=function(e){function n(){var s=r.callbacks[t++];if(!s)return i(e);s(e,n)}var t=0;n()};r.Context=s;s.prototype.pushState=function(){history.pushState(this.state,this.title,this.canonicalPath)};s.prototype.save=function(){history.replaceState(this.state,this.title,this.canonicalPath)};r.Route=o;o.prototype.middleware=function(e){var t=this;return function(n,r){if(t.match(n.path,n.params))return e(n,r);r()}};o.prototype.match=function(e,t){var n=this.keys,r=e.indexOf("?"),i=~r?e.slice(0,r):e,s=this.regexp.exec(decodeURIComponent(i));if(!s)return false;for(var o=1,u=s.length;o<u;++o){var a=n[o-1];var f="string"==typeof s[o]?decodeURIComponent(s[o]):s[o];if(a){t[a.name]=undefined!==t[a.name]?t[a.name]:f}else{t.push(f)}}return true};if("undefined"==typeof module){window.page=r}else{module.exports=r}})()
</script>

<script type="text/javascript">
  (function () {
    // Initialize and render `TutorialNavigator`
    var TutorialNavigator = require('tutorial-navigator');
    var tutorial = new TutorialNavigator({
      docsDomain: document.location.origin,
      apptypes: @@JSON.stringify(quickstart.apptypes)@@,
      clientPlatforms: @@JSON.stringify(quickstart.clientPlatforms)@@,
      hybridPlatforms: @@JSON.stringify(quickstart.hybridPlatforms)@@,
      nativePlatforms: @@JSON.stringify(quickstart.nativePlatforms)@@,
      serverPlatforms: @@JSON.stringify(quickstart.serverPlatforms)@@,
      serverApis: @@JSON.stringify(quickstart.serverApis)@@
    });

    function eqlPath (url) {
      var base = page.base() || '';
      var path = window.location.pathname.slice(base.length) || '/';
      return path === url;
    }

    /**
     * Routing
     */

    function rewrite(ctx, next) {
      // Prepend `/quickstart` to routes withouth `/quickstart`
      if(!/^\/quickstart/.test(ctx.path)) ctx.path = '/quickstart' + ctx.path;
      next();
    }

    page('*', rewrite);
    page('/quickstart/:apptype?', checkstate, render);<commit_msg>Fix pathname rewrite for page.js routing to work without .base() assign<commit_after>---
title: Getting started with Auth0
url: /
---

<script type="text/javascript">
  // IE8/9 SHIM
  if (!window.location.origin) {
    window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
  }
</script>

<script type="text/javascript">

  // Redirect old `/#!/..` urls to new `/quickstart/...`
  var pathname = window.location.pathname || '/';
  var hash = window.location.hash;
  var regex = /^\#\!\//;
  if ('/' === pathname && regex.test(hash)) {
    window.location = window.location.origin + hash.replace(regex, '/quickstart/');
  };

</script>


# Getting started with Auth0

Hello@@account.userName ? ' ' + account.userName : ''@@! Ready to test drive Auth0? All tutorials have been tailored to your account. So in most cases, all you need to do is copy the code snippets and paste them into your projects and tools.

<div class="row getting-started-logos clearfix">
  <div id="navigator-container" class="col-sm-12"></div>
</div>


<script src="https://cdn.auth0.com/tutorial-navigator/latest/build.min.js" type="text/javascript"></script>
<link href="https://cdn.auth0.com/tutorial-navigator/latest/build.min.css" type="text/css" rel="stylesheet"></link>
<script type="text/javascript">
  (function(){function r(e,t){if("function"==typeof e){return r("*",e)}if("function"==typeof t){var n=new o(e);for(var i=1;i<arguments.length;++i){r.callbacks.push(n.middleware(arguments[i]))}}else if("string"==typeof e){r.show(e,t)}else{r.start(e)}}function i(e){var t=window.location.pathname+window.location.search;if(t==e.canonicalPath)return;r.stop();e.unhandled=true;window.location=e.canonicalPath}function s(e,n){if("/"==e[0]&&0!=e.indexOf(t))e=t+e;var r=e.indexOf("?");this.canonicalPath=e;this.path=e.replace(t,"")||"/";this.title=document.title;this.state=n||{};this.state.path=e;this.querystring=~r?e.slice(r+1):"";this.pathname=~r?e.slice(0,r):e;this.params=[];this.hash="";if(!~this.path.indexOf("#"))return;var i=this.path.split("#");this.path=i[0];this.hash=i[1]||"";this.querystring=this.querystring.split("#")[0]}function o(e,t){t=t||{};this.path=e;this.method="GET";this.regexp=u(e,this.keys=[],t.sensitive,t.strict)}function u(e,t,n,r){if(e instanceof RegExp)return e;if(e instanceof Array)e="("+e.join("|")+")";e=e.concat(r?"":"/?").replace(/\/\(/g,"(?:/").replace(/(\/)?(\.)?:(\w+)(?:(\(.*?\)))?(\?)?/g,function(e,n,r,i,s,o){t.push({name:i,optional:!!o});n=n||"";return""+(o?"":n)+"(?:"+(o?n:"")+(r||"")+(s||r&&"([^/.]+?)"||"([^/]+?)")+")"+(o||"")}).replace(/([\/.])/g,"\\$1").replace(/\*/g,"(.*)");return new RegExp("^"+e+"$",n?"":"i")}function a(e){if(e.state){var t=e.state.path;r.replace(t,e.state)}}function f(e){if(1!=l(e))return;if(e.metaKey||e.ctrlKey||e.shiftKey)return;if(e.defaultPrevented)return;var n=e.target;while(n&&"A"!=n.nodeName)n=n.parentNode;if(!n||"A"!=n.nodeName)return;var i=n.getAttribute("href");if(n.pathname==location.pathname&&(n.hash||"#"==i))return;if(i.indexOf("mailto:")>-1)return;if(n.target)return;if(!c(n.href))return;var s=n.pathname+n.search+(n.hash||"");var o=s+n.hash;s=s.replace(t,"");if(t&&o==s)return;e.preventDefault();r.show(o)}function l(e){e=e||window.event;return null==e.which?e.button:e.which}function c(e){var t=location.protocol+"//"+location.hostname;if(location.port)t+=":"+location.port;return 0==e.indexOf(t)}var e=true;var t="";var n;r.callbacks=[];r.base=function(e){if(0==arguments.length)return t;t=e};r.start=function(t){t=t||{};if(n)return;n=true;if(false===t.dispatch)e=false;if(false!==t.popstate)window.addEventListener("popstate",a,false);if(false!==t.click)window.addEventListener("click",f,false);if(!e)return;var i=location.pathname+location.search+location.hash;r.replace(i,null,true,e)};r.stop=function(){n=false;removeEventListener("click",f,false);removeEventListener("popstate",a,false)};r.show=function(e,t,n){var i=new s(e,t);if(false!==n)r.dispatch(i);if(!i.unhandled)i.pushState();return i};r.replace=function(e,t,n,i){var o=new s(e,t);o.init=n;if(null==i)i=true;if(i)r.dispatch(o);o.save();return o};r.dispatch=function(e){function n(){var s=r.callbacks[t++];if(!s)return i(e);s(e,n)}var t=0;n()};r.Context=s;s.prototype.pushState=function(){history.pushState(this.state,this.title,this.canonicalPath)};s.prototype.save=function(){history.replaceState(this.state,this.title,this.canonicalPath)};r.Route=o;o.prototype.middleware=function(e){var t=this;return function(n,r){if(t.match(n.path,n.params))return e(n,r);r()}};o.prototype.match=function(e,t){var n=this.keys,r=e.indexOf("?"),i=~r?e.slice(0,r):e,s=this.regexp.exec(decodeURIComponent(i));if(!s)return false;for(var o=1,u=s.length;o<u;++o){var a=n[o-1];var f="string"==typeof s[o]?decodeURIComponent(s[o]):s[o];if(a){t[a.name]=undefined!==t[a.name]?t[a.name]:f}else{t.push(f)}}return true};if("undefined"==typeof module){window.page=r}else{module.exports=r}})()
</script>

<script type="text/javascript">
  (function () {
    // Initialize and render `TutorialNavigator`
    var TutorialNavigator = require('tutorial-navigator');
    var tutorial = new TutorialNavigator({
      docsDomain: document.location.origin,
      apptypes: @@JSON.stringify(quickstart.apptypes)@@,
      clientPlatforms: @@JSON.stringify(quickstart.clientPlatforms)@@,
      hybridPlatforms: @@JSON.stringify(quickstart.hybridPlatforms)@@,
      nativePlatforms: @@JSON.stringify(quickstart.nativePlatforms)@@,
      serverPlatforms: @@JSON.stringify(quickstart.serverPlatforms)@@,
      serverApis: @@JSON.stringify(quickstart.serverApis)@@
    });

    function eqlPath (url) {
      var base = page.base() || '';
      var path = window.location.pathname.slice(base.length) || '/';
      return path === url;
    }

    /**
     * Routing
     */

    function rewrite(ctx, next) {
      // Prepend `/quickstart` to routes withouth `/quickstart`
      // if(!/^\/quickstart/.test(ctx.path)) ctx.path = '/quickstart' + ctx.path;
      ctx.pathname = ctx.pathname || '/';
      // prepend quickstart if pathname is '/'
      if(/^\/$/.test(ctx.pathname)) ctx.path = '/quickstart' + ctx.path;
      next();
    }

    page('*', rewrite);
    page('/quickstart/:apptype?', checkstate, render);
{'fraction_non_alphanumeric': 0.25171772694204186, 'fraction_numerical': 0.004203378869937758, 'mean_word_length': 6.594843462246777, 'pattern_counts': {'":': 8, '<': 37, '<?xml version=': 0, '>': 35, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '269793', 'n_tokens_mistral': 4755, 'n_tokens_neox': 4666, 'n_words': 468}