text: "use strict";(self.webpackChunkdocusaurus_template=self.webpackChunkdocusaurus_template||[]).push([[5049],{52387:function(e,t,n){n.d(t,{Z:function(){return d}});var a=n(67294),i=n(83300),o=n.n(i),r=n(19055),s="container_2x1S",l=n(25108),c=function(e,t){if(!e)return 0;var n=t.findIndex((function(t){return t.indexOf(e)>-1}));return-1===n?0:n},d=function(e){var t=e.src,n=e.title,i=(0,a.useState)(""),d=i[0],p=i[1];(0,a.useEffect)((function(){var n,a,i;o()(t.replace("github.com","raw.githubusercontent.com").replace("/blob/","/")).then((function(e){return e.text()})).then((n=e,a=n.startAt,i=n.endAt,function(e){var t=e.split("\n"),n=c(a,t);n>0&&(t=["// ..."].concat(t.slice(n,-1)));var o=c(i,t);return o>0&&(t=[].concat(t.slice(0,o+1),["// ..."])),t.join("\n")})).then(p).catch(l.error)}),[]);var u="language-"+function(e){var t=e.split(".").pop();switch(t){case"jsx":return"jsx";case"tsx":return"tsx";case"ts":return"typescript";case"go":return"go";case"yaml":case"yml":return"yaml";case"js":return"javascript";case"html":return"html";case"pug":return"pug";default:return t}}(t),m='title="'+(n||function(e){var t=e.match(new RegExp("https://github.com/[^/]+/[^/]+/blob/[^/]+/(.+)","i"))||[];return t.length>=2?t[1]:e}(t))+'"';return a.createElement("div",{className:s},a.createElement(r.Z,{metastring:m,className:u,children:d}))}},59079:function(e,t,n){n.d(t,{Z:function(){return u}});var a=n(67294),i=n(57273),o="graph_1lrJ",r="pointer_3d8u",s="overlay_2fuY",l="visible_2Z3U",c="backdrop_2z5L",d=n(94184),p=n.n(d);i.Z.initialize({startOnLoad:!0,logLevel:"fatal",securityLevel:"strict",arrowMarkerAbsolute:!1,theme:"neutral",flowchart:{useMaxWidth:!0,htmlLabels:!0,rankSpacing:65,nodeSpacing:30,curve:"basis"},sequence:{useMaxWidth:!0},gantt:{useMaxWidth:!0}});var u=function(e){var t,n=e.chart,d=(0,a.useState)(!1),u=d[0],m=d[1],h=(0,a.useState)(void 0),k=h[0],f=h[1],g=(0,a.useState)("mermaid-"+Math.random().toString(36).substr(2,-1))[0],v=function(){return m(!u)};return(0,a.useEffect)((function(){i.Z.render(g,n,(function(e){f(e)}))}),[]),a.createElement(a.Fragment,null,a.createElement("div",{onClick:v,className:p()(o,r),dangerouslySetInnerHTML:{__html:k}}),a.createElement("div",{onClick:v,className:p()(s,r,o,(t={},t[l]=u,t))},a.createElement("div",{onClick:function(e){return e.stopPropagation()},className:p()(c,o),dangerouslySetInnerHTML:{__html:k}})))}},34235:function(e,t,n){n.r(t),n.d(t,{frontMatter:function(){return c},contentTitle:function(){return d},metadata:function(){return p},toc:function(){return u},default:function(){return h}});var a=n(87462),i=n(63366),o=(n(67294),n(3905)),r=n(59079),s=n(52387),l=["components"],c={id:"quickstart",title:"Quickstart"},d=void 0,p={unversionedId:"quickstart",id:"quickstart",isDocsHomePage:!1,title:"Quickstart",description:"Ory Kratos has several moving parts and getting everything right from the",source:"@site/docs/quickstart.mdx",sourceDirName:".",slug:"/quickstart",permalink:"/kratos/docs/next/quickstart",editUrl:"https://github.com/ory/kratos/edit/master/docs/docs/quickstart.mdx",tags:[],version:"current",lastUpdatedBy:"hackerman",lastUpdatedAt:1641070818,formattedLastUpdatedAt:"1/1/2022",frontMatter:{id:"quickstart",title:"Quickstart"},sidebar:"docs",previous:{title:"Introduction",permalink:"/kratos/docs/next/"},next:{title:"Installation",permalink:"/kratos/docs/next/install"}},u=[{value:"Use Case: Application Login and Registration",id:"use-case-application-login-and-registration",children:[],level:2},{value:"Setup",id:"setup",children:[{value:"Clone Ory Kratos and Run it in Docker",id:"clone-ory-kratos-and-run-it-in-docker",children:[],level:3},{value:"Network Architecture",id:"network-architecture",children:[],level:3}],level:2},{value:"Perform Registration, Login, and Logout",id:"perform-registration-login-and-logout",children:[{value:"Understanding How Login and Registration Works",id:"understanding-how-login-and-registration-works",children:[],level:3},{value:"Email Verification",id:"email-verification",children:[],level:3},{value:"Account Recovery",id:"account-recovery",children:[{value:"Configuration",id:"configuration",children:[],level:4}],level:3}],level:2},{value:"Cleaning Up Docker",id:"cleaning-up-docker",children:[],level:2},{value:"Next Steps",id:"next-steps",children:[{value:"Quickstart Configuration",id:"quickstart-configuration",children:[],level:3}],level:2}],m={toc:u};function h(e){var t=e.components,c=(0,i.Z)(e,l);return(0,o.kt)("wrapper",(0,a.Z)({},m,c,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,"Ory Kratos has several moving parts and getting everything right from the\nbeginning can be challenging. This getting started guide will help you install\nOry Kratos and some additional dependencies so that you can see how it works."),(0,o.kt)("p",null,"Please be aware that this guide is not a replacement for studying the docs. You\nmust understand core concepts and APIs to use Ory Kratos productively. This is\nmerely a guide to get you set up with some examples."),(0,o.kt)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/JhlIZ3aChXc",frameborder:"0",allowfullscreen:!0}),(0,o.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"info")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"Video based on Ory Kratos 0.5.5 quickstart, so some routes a changed."))),(0,o.kt)("h2",{id:"use-case-application-login-and-registration"},"Use Case: Application Login and Registration"),(0,o.kt)("p",null,"This section gives you some context on what we want to achieve and what tools we\nneed for that. You will also learn about the network set up we picked for this\nguide."),(0,o.kt)("p",null,"This quickstart guide operates on the assumption that we are writing a NodeJS\napp. This app is using nothing fancy - some ExpressJS and a bit of HTML\nTemplating using Handlebars. We do want to use TypeScript, but only because it's\nmore readable - not because we're doing anything out of the ordinary!"),(0,o.kt)("p",null,"You could pick any technology here, of course. This works with Swift, ReactJS,\nor Angular (client side) as well as with PHP, Ruby, Python, Java (server side) -\nyou name it! We picked NodeJS + TypeScript because we believe it is the easiest\nto understand, and because JavaScript and NodeJS are universally understood and\neasy to install."),(0,o.kt)("p",null,"We know our app will need to have some type of dashboard and that it needs\nusers. Therefore, we need:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Login"),(0,o.kt)("li",{parentName:"ul"},"Logout"),(0,o.kt)("li",{parentName:"ul"},"Registration"),(0,o.kt)("li",{parentName:"ul"},'Profile management ("update first name", "update avatar", etc.)'),(0,o.kt)("li",{parentName:"ul"},'Credentials Management ("add a new recovery email", "change password", etc.)'),(0,o.kt)("li",{parentName:"ul"},'Account Recovery ("password reset")'),(0,o.kt)("li",{parentName:"ul"},"Email Verification"),(0,o.kt)("li",{parentName:"ul"},"Two Factor Authentication"),(0,o.kt)("li",{parentName:"ul"},'"Sign in with Google" and "Sign in with GitHub"')),(0,o.kt)("p",null,"and of course:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A dashboard that shows ",(0,o.kt)("inlineCode",{parentName:"li"},"Hello {{ traits.name.first }} {{ traits.name.last }}!"),"\nwhich is only visible when the user is signed in.")),(0,o.kt)("h2",{id:"setup"},"Setup"),(0,o.kt)("p",null,'As you might already know, Ory Kratos is API-only; it does not have a UI or HTML\ntemplating engine. We will implement all the user-facing UIs like "dashboard",\n"login", and "registration" in our NodeJS app!'),(0,o.kt)("p",null,"To ensure that no one can access the dashboard without prior authentication\n(login), we can use a small piece of code (here ExpressJS) to do that:"),(0,o.kt)(s.Z,{lang:"js",title:"https://github.com/ory/kratos-selfservice-ui-node/blob/master/src/pkg/middleware.ts",src:"https://raw.githubusercontent.com/ory/kratos-selfservice-ui-node/master/src/pkg/middleware.ts",mdxType:"CodeFromRemote"}),(0,o.kt)("div",{className:"admonition admonition-info alert alert--info"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))),"info")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"Ory Kratos is not just an API: it uses cookies, HTTP redirects, anti-CSRF tokens\nand more so you don't have to."))),(0,o.kt)("p",null,"The NodeJS app and Ory Kratos need to share cookies in order for anti-CSRF\ntokens and login sessions to work. Because the quickstart runs on different\nports on ",(0,o.kt)("inlineCode",{parentName:"p"},"127.0.0.1")," there is nothing we need to do to get this all working. In\nenvironments where you have multiple sub-domains or reverse proxies, the set up\nwill be a bit more sophisticated. You can find more information about the\ndifferent set up possibilities in the\n",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/guides/multi-domain-cookies"},"Getting Cookies to Work on Multi-Domains Guide"),"."),(0,o.kt)("p",null,"Ory Kratos does not ship with an administrative user interface. You must\nimplement that yourself or choose the Ory Cloud offering (to be announced). In\nthis quickstart we will use Ory Kratos' CLI to interact with Ory Kratos' APIs."),(0,o.kt)("p",null,"The quickstart also comes with ",(0,o.kt)("a",{parentName:"p",href:"https://mailslurper.com"},"MailSlurper"),", a mock\nSMTP server the demo uses to show how email verification works."),(0,o.kt)("h3",{id:"clone-ory-kratos-and-run-it-in-docker"},"Clone Ory Kratos and Run it in Docker"),(0,o.kt)("p",null,"To get this example working, you will need Git,\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker"),", and\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/compose/install/"},"Docker Compose")," installed on your\nsystem. No other dependencies are required. Before you start, make sure that\nDocker has enough disk space."),(0,o.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"tip")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"This tutorial uses Docker-Compose volumes which have reported to run out of disk\nspace. Check the remaining disk space using ",(0,o.kt)("inlineCode",{parentName:"p"},"docker system df"),". If the volumes\nare above the 85% threshold,\n",(0,o.kt)("a",{parentName:"p",href:"https://docs.docker.com/config/pruning/"},"prune old Docker objects")," before you\nstart!"))),(0,o.kt)("div",{className:"admonition admonition-tip alert alert--success"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))),"tip")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"If you encounter build errors (e.g. network timeout), make sure that the network\nis running correctly and run ",(0,o.kt)("inlineCode",{parentName:"p"},"make docker")," again. If the problem persists, feel\nfree to ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/issues/new/choose"},"open an issue"),"."))),(0,o.kt)("p",null,"Let's clone Ory Kratos and run ",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"git clone https://github.com/ory/kratos.git\ncd kratos\ngit checkout v0.8.0-alpha.3\n\ndocker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate\n# If you have SELinux, run:\ndocker-compose -f quickstart.yml -f quickstart-selinux.yml -f quickstart-standalone.yml up --build --force-recreate\n")),(0,o.kt)("p",null,"This might take a minute or two. Once the output slows down and logs indicate a\nhealthy system you're ready to roll! A healthy system will show something along\nthe lines of (the order of messages might be reversed):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'kratos_1 | time="2020-01-20T14:52:13Z" level=info msg="Starting the admin httpd on: 0.0.0.0:4434"\nkratos_1 | time="2020-01-20T14:52:13Z" level=info msg="Starting the public httpd on: 0.0.0.0:4433"\n')),(0,o.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"There are two important factors to get a fully functional system:"),(0,o.kt)("ul",{parentName:"div"},(0,o.kt)("li",{parentName:"ul"},"You need to make sure that ports ",(0,o.kt)("inlineCode",{parentName:"li"},"4455"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"4433"),", ",(0,o.kt)("inlineCode",{parentName:"li"},"4434"),", and ",(0,o.kt)("inlineCode",{parentName:"li"},"4436"),"\xa0",(0,o.kt)("a",{parentName:"li",href:"https://serverfault.com/questions/309052/check-if-port-is-open-or-closed-on-a-linux-server"},"are free"),"."),(0,o.kt)("li",{parentName:"ul"},"Make sure to always use ",(0,o.kt)("inlineCode",{parentName:"li"},"127.0.0.1")," as the hostname; never use ",(0,o.kt)("inlineCode",{parentName:"li"},"localhost"),"!\nThis is important because browsers treat these two as separate domains and\nwill therefore have issues with setting and using cookies correctly.")))),(0,o.kt)("p",null,"There is no database being used in this example. Ory Kratos supports SQLite,\nPostgreSQL, MySQL, and CockroachDB as database backends. For the quickstart,\nwe're mounting a persistent volume to store the SQLite database in."),(0,o.kt)("p",null,"Future guides will explain how to set up a production system."),(0,o.kt)("h3",{id:"network-architecture"},"Network Architecture"),(0,o.kt)("p",null,"This demo makes use of several services:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/ory/kratos"},"Ory Kratos"),(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},'Public ("Browser") API (port 4433)'),(0,o.kt)("li",{parentName:"ul"},"Admin API (port 4434) - This is only made public so we can test via the\nCLI."))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("a",{parentName:"li",href:"http://github.com/ory/kratos-selfservice-ui-node"},"NodeJS Selfservice UI"),(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},"Public (port 4455) - an example application written in NodeJS that\nimplements the login, registration, logout, dashboard, and other UIs."))),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("a",{parentName:"li",href:"https://github.com/mailslurper"},"MailSlurper"),(0,o.kt)("ul",{parentName:"li"},(0,o.kt)("li",{parentName:"ul"},"Public (port 4436) - a development SMTP server which Ory Kratos will use to\nsend emails.")))),(0,o.kt)("p",null,"To better understand the application architecture, let's take a look at the\nnetwork configuration. This assumes that you have at least some understanding of\nhow Docker networks work:"),(0,o.kt)(r.Z,{chart:'\ngraph TD\nsubgraph hn[Host Network]\n    B[Browser]\n    B--\x3e|Can access URLs via 127.0.0.1:4455|OKPHN\n    B--\x3e|Can access URLs via 127.0.0.1:4433|PAPI\n    B--\x3e|Can access UI via 127.0.0.1:4436|SMTPUI\n    OKPHN([Selfservice UI exposed at :4455])\n    SMTPUI([MailSlurper UI exposed at :4436])\n    PAPI([Ory Kratos Public API exposed at :4433])\nend\nsubgraph dn["Internal Docker Network (intranet)"]\n    OKPHN-.->SA\n    SMTPUI-.->SMTP\n    PAPI-.->OK\n    SA--\x3e|Talks to and validates login sessions using|OK\n    OK--\x3e|Sends mail via|SMTP\n    OK[Ory Kratos]\n    SA["Selfservice UI (Ory Kratos SelfService UI Node Example)"]\n    SMTP["SMTP Server (MailSlurper)"]\nend\n',mdxType:"Mermaid"}),(0,o.kt)("h2",{id:"perform-registration-login-and-logout"},"Perform Registration, Login, and Logout"),(0,o.kt)("p",null,"Enough theory, it's time to get this thing going! Let's start by trying to open\nthe dashboard - ",(0,o.kt)("strong",{parentName:"p"},"go to\n",(0,o.kt)("a",{parentName:"strong",href:"http://127.0.0.1:4455/welcome"},"127.0.0.1:4455/welcome")),"."),(0,o.kt)("p",null,"You should end up at the dashboard:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Dashboard screen of your secured app",src:n(22303).Z})),(0,o.kt)("p",null,"Under the section ",(0,o.kt)("inlineCode",{parentName:"p"},"Session Information")," you can find the Ory Session details, as\nthere is no active session this is empty for now."),(0,o.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"The rendered login form should be a standard HTML ",(0,o.kt)("inlineCode",{parentName:"p"},"<form>"),". AJAX requests\nrequire ",(0,o.kt)("inlineCode",{parentName:"p"},"credentials: 'include'"),". This flow also works with Single Page Apps\n(SPA) and frameworks like Angular or ReactJS. For more details about the\nspecific flows for SPAs head over to the ",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/concepts/index"},"concept")," chapter."))),(0,o.kt)("p",null,"Click ",(0,o.kt)("inlineCode",{parentName:"p"},"Sign In")," to start a login flow. On the Sign In Screen you can see the\nunique login ",(0,o.kt)("inlineCode",{parentName:"p"},"<flow_id>")," e.g. ",(0,o.kt)("inlineCode",{parentName:"p"},"?flow=78e374d2-f36b-40ae-922d-e81f812ea897"),"\nappended to the /login route in the URL."),(0,o.kt)("p",null,"Looking at the network stack, you can see two redirects happening:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Network trace of your secured app",src:n(90457).Z})),(0,o.kt)("p",null,"Here's a play-by-play of what happened:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("inlineCode",{parentName:"li"},"/login")," redirected you to\n",(0,o.kt)("inlineCode",{parentName:"li"},"http://127.0.0.1:4433/self-service/login/browser"),", which is one of Ory\nKratos' APIs used for logging in browser-based applications."),(0,o.kt)("li",{parentName:"ol"},"Kratos handled ",(0,o.kt)("inlineCode",{parentName:"li"},"/self-service/login/browser")," which created and persisted a\nnew flow with ",(0,o.kt)("inlineCode",{parentName:"li"},"csrf_token"),". Kratos would check no session exists, redirected\nthe browser to ",(0,o.kt)("inlineCode",{parentName:"li"},"/login?flow=<flow_id>"),". If a session exists already, the\nbrowser will be redirected to ",(0,o.kt)("inlineCode",{parentName:"li"},"urls.default_redirect_url")," unless the query\nparameter ",(0,o.kt)("inlineCode",{parentName:"li"},"?refresh=true")," was set."),(0,o.kt)("li",{parentName:"ol"},"The login UI handled the ",(0,o.kt)("inlineCode",{parentName:"li"},"/login")," route, found the ",(0,o.kt)("inlineCode",{parentName:"li"},"<flow_id>")," in the URL\nquery parameter, and used it to make an HTTP request to\n",(0,o.kt)("inlineCode",{parentName:"li"},"http://kratos:4433/self-service/login/flows?id=<flow_id>"),". Notice the URI is\n",(0,o.kt)("inlineCode",{parentName:"li"},"kratos:4433")," because SecureApp is making a server-side HTTP request via\nDocker's private network to Ory Kratos' Admin API."),(0,o.kt)("li",{parentName:"ol"},"Ory Kratos responded with data which SecureApp used to render the HTML login\nform.")),(0,o.kt)("p",null,"We can use ",(0,o.kt)("inlineCode",{parentName:"p"},"curl")," to get an example of the payload that Ory Kratos responds\nwith. ",(0,o.kt)("inlineCode",{parentName:"p"},"GET")," a valid ",(0,o.kt)("inlineCode",{parentName:"p"},"<flow_id>")," or copy it from your browser and make a request\nto ",(0,o.kt)("inlineCode",{parentName:"p"},"/self-service/login/"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell-session"},'$ flowId=$(curl -s -X GET \\\n    -H "Accept: application/json" \\\n    http://127.0.0.1:4433/self-service/login/api | jq -r \'.id\')\n$ curl -s -X GET \\\n    -H "Accept: application/json" \\\n    "http://127.0.0.1:4433/self-service/login/flows?id=$flowId" | jq\n{\n  "id": "f091ccf5-df85-493e-a9a3-de9b86925a45",\n  "type": "api",\n  "expires_at": "2021-12-13T18:31:57.1189985Z",\n  "issued_at": "2021-12-13T18:21:57.1189985Z",\n  "request_url": "http://127.0.0.1:4433/self-service/login/api",\n  "ui": {\n    "action": "http://127.0.0.1:4433/self-service/login?flow=f091ccf5-df85-493e-a9a3-de9b86925a45",\n    "method": "POST",\n    "nodes": [\n      {\n        "type": "input",\n        "group": "default",\n        "attributes": {\n          "name": "csrf_token",\n          "type": "hidden",\n          "value": "",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {}\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "password_identifier",\n          "type": "text",\n          "value": "",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070004,\n            "text": "ID",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "password",\n          "type": "password",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070001,\n            "text": "Password",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "method",\n          "type": "submit",\n          "value": "password",\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1010001,\n            "text": "Sign in",\n            "type": "info",\n            "context": {}\n          }\n        }\n      }\n    ]\n  },\n  "created_at": "2021-12-13T18:21:57.121894Z",\n  "updated_at": "2021-12-13T18:21:57.121894Z",\n  "refresh": false,\n  "requested_aal": "aal1"\n}\n')),(0,o.kt)("p",null,'Let\'s move on to the next flow - registration! Click on "Register new account",\nwhich initiates a flow similar to the one we just used:'),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Registration screen of your secured app",src:n(97556).Z})),(0,o.kt)("p",null,"The network trace should look familiar by now:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Registration with network trace screen of your secured app",src:n(23002).Z})),(0,o.kt)("p",null,"To get an example of the payload for a registration flow, we can use the same\n",(0,o.kt)("inlineCode",{parentName:"p"},"curl")," request as above, now to the ",(0,o.kt)("inlineCode",{parentName:"p"},"self-service/registration")," endpoint."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},'$ flowId=$(curl -s -X GET \\\n    -H "Accept: application/json" \\\n    http://127.0.0.1:4433/self-service/registration/api | jq -r \'.id\')\n\n$ curl -s -X GET \\\n    -H "Accept: application/json" \\\n    "http://127.0.0.1:4433/self-service/registration/flows?id=$flowId" | jq\n{\n  "id": "d62a3a8d-d3f3-4ca5-af54-0e8747b53b41",\n  "type": "api",\n  "expires_at": "2021-12-13T19:55:06.9350485Z",\n  "issued_at": "2021-12-13T19:45:06.9350485Z",\n  "request_url": "http://127.0.0.1:4433/self-service/registration/api",\n  "ui": {\n    "action": "http://127.0.0.1:4433/self-service/registration?flow=d62a3a8d-d3f3-4ca5-af54-0e8747b53b41",\n    "method": "POST",\n    "nodes": [\n      {\n        "type": "input",\n        "group": "default",\n        "attributes": {\n          "name": "csrf_token",\n          "type": "hidden",\n          "value": "",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {}\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "traits.email",\n          "type": "email",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070002,\n            "text": "E-Mail",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "password",\n          "type": "password",\n          "required": true,\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070001,\n            "text": "Password",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "traits.name.first",\n          "type": "text",\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070002,\n            "text": "First Name",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "traits.name.last",\n          "type": "text",\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1070002,\n            "text": "Last Name",\n            "type": "info"\n          }\n        }\n      },\n      {\n        "type": "input",\n        "group": "password",\n        "attributes": {\n          "name": "method",\n          "type": "submit",\n          "value": "password",\n          "disabled": false,\n          "node_type": "input"\n        },\n        "messages": [],\n        "meta": {\n          "label": {\n            "id": 1040001,\n            "text": "Sign up",\n            "type": "info",\n            "context": {}\n          }\n        }\n      }\n    ]\n  }\n}\n')),(0,o.kt)("p",null,"If we try to sign up using a password like ",(0,o.kt)("inlineCode",{parentName:"p"},"123456"),", Krato's password policy\nwill complain:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Registration with network trace screen of your secured app",src:n(11395).Z})),(0,o.kt)("p",null,"Setting a password that doesn't violate these policies, we will be immediately\nredirected to the dashboard:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"SecureApp Dashboard",src:n(17331).Z})),(0,o.kt)("p",null,'By clicking the "logout" icon in the top right, you will be redirected to the\nlogin screen again where you will be able to use your credentials to log back in\nagain. Exciting!'),(0,o.kt)("h3",{id:"understanding-how-login-and-registration-works"},"Understanding How Login and Registration Works"),(0,o.kt)("p",null,"Head over to the ",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/self-service"},"Self-Service Flows Chapter")," for an in-depth\nexplanation of how each individual flow works."),(0,o.kt)("h3",{id:"email-verification"},"Email Verification"),(0,o.kt)("p",null,"As you've signed up, an email was sent to the email address you used. Because\nthe quickstart uses a fake SMTP server, the email did not arrive in your inbox.\nYou can retrieve the email however by opening the MailSlurper UI at\n",(0,o.kt)("a",{parentName:"p",href:"http://127.0.0.1:4436"},"127.0.0.1:4436"),"."),(0,o.kt)("p",null,"You should see something like this:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"User Email Verification",src:n(32221).Z})),(0,o.kt)("p",null,"If not, hard refresh the tab or click on the home icon in the menu bar."),(0,o.kt)("p",null,"Next, click the verification link. You will end up at the dashboard, with a\nverified email address (check the ",(0,o.kt)("inlineCode",{parentName:"p"},"verified")," and ",(0,o.kt)("inlineCode",{parentName:"p"},"verified_at")," field in the JSON\nresponse):"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json",metastring:"{31}","{31}":!0},'{\n  "id": "5fe6b562-c5a6-4adf-a3a7-a1e588c11c66",\n  "active": true,\n  "expires_at": "2021-12-14T19:35:21.7271879Z",\n  "authenticated_at": "2021-12-13T19:35:21.7271879Z",\n  "authenticator_assurance_level": "aal1",\n  "authentication_methods": [\n    {\n      "method": "password",\n      "completed_at": "2021-12-13T19:35:21.7271762Z"\n    }\n  ],\n  "issued_at": "2021-12-13T19:35:21.7271879Z",\n  "identity": {\n    "id": "0435468f-5b39-4f06-8257-af418412891d",\n    "schema_id": "default",\n    "schema_url": "http://127.0.0.1:4433/schemas/default",\n    "state": "active",\n    "state_changed_at": "2021-12-13T19:32:48.7715418Z",\n    "traits": {\n      "name": {\n        "first": "Foo",\n        "last": "Bar"\n      },\n      "email": "foo@ory.sh"\n    },\n    "verifiable_addresses": [\n      {\n        "id": "9fccf5c1-c374-4a15-8f01-1fd5cb3bea55",\n        "value": "foo@ory.sh",\n        "verified": true,\n        "via": "email",\n        "status": "completed",\n        "verified_at": "2021-12-13T19:34:45.4343846Z",\n        "created_at": "2021-12-13T19:32:48.775138Z",\n        "updated_at": "2021-12-13T19:34:53.449022Z"\n      }\n    ],\n    "recovery_addresses": [\n      {\n        "id": "0df6ddf6-780b-4c3c-ba31-4a349a2a1bc5",\n        "value": "foo@ory.sh",\n        "via": "email",\n        "created_at": "2021-12-13T19:32:48.775823Z",\n        "updated_at": "2021-12-13T19:34:53.449207Z"\n      }\n    ],\n    "created_at": "2021-12-13T19:32:48.773627Z",\n    "updated_at": "2021-12-13T19:32:48.773627Z"\n  }\n}\n')),(0,o.kt)("p",null,"To re-request the verification email, fill out the form at\n",(0,o.kt)("a",{parentName:"p",href:"http://127.0.0.1:4455/verification"},"127.0.0.1:4455/verification"),"."),(0,o.kt)("p",null,"To learn more about verification recovery, head over to the\n",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/self-service/flows/verify-email-account-activation"},"Email and Phone Verification and Account Activation Documentation"),"."),(0,o.kt)("h3",{id:"account-recovery"},"Account Recovery"),(0,o.kt)("p",null,'The quickstart has account recovery enabled. To recover an account, log out and\nclick on "Recover Account":'),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Click on recover account",src:n(35843).Z})),(0,o.kt)("p",null,"The next screen shows a HTML form where you enter your email address:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Enter your email address",src:n(9424).Z})),(0,o.kt)("p",null,'Hit "submit" and check the emails for the account recovery message:'),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Check your email for the password reset email",src:n(92718).Z})),(0,o.kt)("p",null,"Click the link, and change your password:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"Change your password",src:n(72635).Z})),(0,o.kt)("p",null,"You are now able to sign in with the new password. To learn more about account\nrecovery, head over to the\n",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/self-service/flows/account-recovery"},"Account Recovery Documentation"),"."),(0,o.kt)("h4",{id:"configuration"},"Configuration"),(0,o.kt)("p",null,"You can find all configuration files used for this quickstart guide in\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/tree//contrib/quickstart/kratos/email-password"},(0,o.kt)("inlineCode",{parentName:"a"},"./contrib/quickstart/kratos")),"\n, ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob//quickstart.yml"},(0,o.kt)("inlineCode",{parentName:"a"},"./quickstart.yml")),", and\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob//quickstart-standalone.yml"},(0,o.kt)("inlineCode",{parentName:"a"},"./quickstart-standalone.yml")),".\nTo understand what each of those configuration files does, consult the other\nchapters of this documentation."),(0,o.kt)("div",{className:"admonition admonition-note alert alert--secondary"},(0,o.kt)("div",{parentName:"div",className:"admonition-heading"},(0,o.kt)("h5",{parentName:"div"},(0,o.kt)("span",{parentName:"h5",className:"admonition-icon"},(0,o.kt)("svg",{parentName:"span",xmlns:"http://www.w3.org/2000/svg",width:"14",height:"16",viewBox:"0 0 14 16"},(0,o.kt)("path",{parentName:"svg",fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))),"note")),(0,o.kt)("div",{parentName:"div",className:"admonition-content"},(0,o.kt)("p",{parentName:"div"},"To get a minimal version of Ory Kratos running, you need to set configuration\nvalues for\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob//contrib/quickstart/kratos/email-password/kratos.yml#L75"},(0,o.kt)("inlineCode",{parentName:"a"},"identity.default_schema_url")),"\nand ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob//quickstart.yml#L42"},(0,o.kt)("inlineCode",{parentName:"a"},"DSN")),". You should\nalso configure\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob//contrib/quickstart/kratos/email-password/kratos.yml#L24"},(0,o.kt)("inlineCode",{parentName:"a"},"selfservice.flows.*.ui_url")),"\nor else Kratos will use fallback URLs."))),(0,o.kt)("p",null,"This is just scratching the surface of Ory Kratos, see ",(0,o.kt)("a",{parentName:"p",href:"#next-steps"},"Next Steps"),"\nfor pointers how to continue."),(0,o.kt)("h2",{id:"cleaning-up-docker"},"Cleaning Up Docker"),(0,o.kt)("p",null,"To clean everything up, you need to bring down the Docker Compose environment\nand remove all mounted volumes."),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-shell",metastring:"script",script:!0},"docker-compose -f quickstart.yml down -v\ndocker-compose -f quickstart.yml rm -fsv\n")),(0,o.kt)("h2",{id:"next-steps"},"Next Steps"),(0,o.kt)("p",null,"Here is some information should you want to modify the quickstart:"),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Social Login")),(0,o.kt)("p",null,(0,o.kt)("a",{parentName:"p",href:"guides/sign-in-with-github-google-facebook-linkedin/"},"Step-by-step guides")," to\nadd sign up and login with popular OIDC providers to the Ory Kratos Quickstart,\nfor example:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"guides/sign-in-with-github-google-facebook-linkedin/#github"},"GitHub")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"guides/sign-in-with-github-google-facebook-linkedin/#google"},"Google")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("a",{parentName:"li",href:"guides/sign-in-with-github-google-facebook-linkedin/#facebook"},"Facebook")," and\n",(0,o.kt)("a",{parentName:"li",href:"guides/sign-in-with-github-google-facebook-linkedin/"},"many more"),".")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Use a different database")),(0,o.kt)("p",null,"If you want to run the quickstart with PostgreSQL, run the following\ndocker-compose:\n",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-postgres.yml up --build --force-recreate")),(0,o.kt)("p",null,"If you want to run the quickstart with CockroachDB, run the following\ndocker-compose:\n",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-crdb.yml up --build --force-recreate")),(0,o.kt)("p",null,"If you want to run the quickstart with MySQL, run the following docker-compose:\n",(0,o.kt)("inlineCode",{parentName:"p"},"docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-mysql.yml up --build --force-recreate")),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Change ports")),(0,o.kt)("p",null,"If you want to change ports for the SelfService-UI, you need to change them in\n",(0,o.kt)("inlineCode",{parentName:"p"},"quickstart.yml")," as well as in the\n",(0,o.kt)("inlineCode",{parentName:"p"},"contrib/quickstart/kratos/email-password/kratos.yml")," accordingly."),(0,o.kt)("p",null,"Note that you also need to change the ports for flows (error, settings,\nrecovery, verification, logout, login, registration)."),(0,o.kt)("p",null,"The same procedure applies if you want to change ports for the Public UI/Admin\nUI or the Mailslurper."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Hooks")),(0,o.kt)("p",null,"To change the redirects happening after registration,login or a settings change,\ntake a look at this document: ",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/self-service/hooks"},"Hooks"),"."),(0,o.kt)("p",null,"If you delete the ",(0,o.kt)("inlineCode",{parentName:"p"},"session")," hook from ",(0,o.kt)("inlineCode",{parentName:"p"},"kratos.yml"),", the user will ",(0,o.kt)("em",{parentName:"p"},"not")," be\nimmediately signed in after registration."),(0,o.kt)("h3",{id:"quickstart-configuration"},"Quickstart Configuration"),(0,o.kt)("p",null,"In this tutorial we use a simplified configuration. You can find it in\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob/master/contrib/quickstart/kratos/email-password/kratos.yml"},(0,o.kt)("inlineCode",{parentName:"a"},"contrib/quickstart/kratos/email-password/kratos.yml")),".\nIn the same place the\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob/master/contrib/quickstart/kratos/email-password/identity.schema.json"},"identity schema"),"\nused in the tutorial can be found. The configuration gets loaded in\ndocker-compose as specified in the\n",(0,o.kt)("a",{parentName:"p",href:"https://github.com/ory/kratos/blob/master/quickstart.yml"},(0,o.kt)("inlineCode",{parentName:"a"},"quickstart.yml")),"."),(0,o.kt)(s.Z,{lang:"yml",link:"https://github.com/ory/kratos/blob/master/quickstart.yml",src:"https://github.com/ory/kratos/blob/master/contrib/quickstart/kratos/email-password/kratos.yml",mdxType:"CodeFromRemote"}),(0,o.kt)("p",null,"Have a look at the ",(0,o.kt)("a",{parentName:"p",href:"/kratos/docs/next/reference/configuration"},"reference configuration")," for\nfurther information on possible configuration options."))}h.isMDXComponent=!0},83300:function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,n.fetch&&(t.default=n.fetch.bind(n)),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response},32221:function(e,t,n){t.Z=n.p+"assets/images/mailslurper-quickstart-956e96c6f57f93dc59fb6288fab220b9.png"},35843:function(e,t,n){t.Z=n.p+"assets/images/quickstart-recover-i-0d15279ea4794f77c907219347e9d207.png"},9424:function(e,t,n){t.Z=n.p+"assets/images/quickstart-recover-ii-80c29d7215c42935fad121240efa9cd7.png"},92718:function(e,t,n){t.Z=n.p+"assets/images/quickstart-recover-iii-bec6a64861b8f15c60a50ef3f8d0f5f4.png"},72635:function(e,t,n){t.Z=n.p+"assets/images/quickstart-recover-iv-3dbe222612a2f66c260cb642956e3366.png"},17331:function(e,t,n){t.Z=n.p+"assets/images/secureapp-dashboard-712e6f0d613889ff258e17b3eec7a7bc.png"},90457:function(e,t,n){t.Z=n.p+"assets/images/secureapp-login-ntrace-559b5dc4faaf0849402f6c6a8eeff37a.png"},23002:function(e,t,n){t.Z=n.p+"assets/images/secureapp-registration-ntrace-2904890ceed687004d207a7edabbf898.png"},11395:function(e,t,n){t.Z=n.p+"assets/images/secureapp-registration-pwpolicy-ce26f258a1af5fb26b653b61bc009505.png"},97556:function(e,t,n){t.Z=n.p+"assets/images/secureapp-registration-e32d503f13c511a93d1dd1c369cca564.png"},22303:function(e,t,n){t.Z=n.p+"assets/images/ui-unverified-dashboard-c96831d635854957347dc1d300802c60.png"}}]);