Move auth routes in auth subfolder
This commit is contained in:
parent
ee34ef4668
commit
010eab0196
11 changed files with 28 additions and 34 deletions
|
@ -26,7 +26,6 @@ serve:
|
||||||
base_url: http://kratos:4434/
|
base_url: http://kratos:4434/
|
||||||
|
|
||||||
selfservice:
|
selfservice:
|
||||||
# default_browser_return_url: http://localhost:4455/ui/welcome
|
|
||||||
default_browser_return_url: http://localhost:3000/
|
default_browser_return_url: http://localhost:3000/
|
||||||
allowed_return_urls:
|
allowed_return_urls:
|
||||||
- http://localhost:3000
|
- http://localhost:3000
|
||||||
|
@ -37,31 +36,31 @@ selfservice:
|
||||||
|
|
||||||
flows:
|
flows:
|
||||||
error:
|
error:
|
||||||
ui_url: http://localhost:3000/login
|
ui_url: http://localhost:3000/auth/login
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
ui_url: http://localhost:3000/settings
|
ui_url: http://localhost:3000/auth/settings
|
||||||
privileged_session_max_age: 15m
|
privileged_session_max_age: 15m
|
||||||
|
|
||||||
recovery:
|
recovery:
|
||||||
enabled: true
|
enabled: true
|
||||||
ui_url: http://localhost:3000/recovery
|
ui_url: http://localhost:3000/auth/recovery
|
||||||
|
|
||||||
verification:
|
verification:
|
||||||
enabled: true
|
enabled: true
|
||||||
ui_url: http://localhost:3000/verification
|
ui_url: http://localhost:3000/auth/verification
|
||||||
after:
|
after:
|
||||||
default_browser_return_url: http://localhost:3000/
|
default_browser_return_url: http://localhost:3000/
|
||||||
|
|
||||||
logout:
|
logout:
|
||||||
after:
|
after:
|
||||||
default_browser_return_url: http://localhost:3000/login
|
default_browser_return_url: http://localhost:3000/auth/login
|
||||||
|
|
||||||
login:
|
login:
|
||||||
ui_url: http://localhost:3000/login
|
ui_url: http://localhost:3000/auth/login
|
||||||
|
|
||||||
registration:
|
registration:
|
||||||
ui_url: http://localhost:3000/registration
|
ui_url: http://localhost:3000/auth/registration
|
||||||
after:
|
after:
|
||||||
password:
|
password:
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
if (browser) {
|
if (browser) {
|
||||||
if (_identity.id) {
|
if (_identity.id) {
|
||||||
console.log("signed in");
|
console.log("signed in");
|
||||||
console.log(_identity);
|
|
||||||
} else {
|
} else {
|
||||||
console.log("not signed in");
|
console.log("not signed in");
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,10 @@
|
||||||
|
|
||||||
<!-- -------------------------------------------------------------------------->
|
<!-- -------------------------------------------------------------------------->
|
||||||
<section id="welcome">
|
<section id="welcome">
|
||||||
<h2>welcome</h2>
|
<h1>Probo</h1>
|
||||||
|
|
||||||
{#if !_identity.id}
|
{#if !_identity.id}
|
||||||
<p><a href="{APP}/login">login</a></p>
|
<p><a href="{APP}/auth/login">Login</a></p>
|
||||||
{:else}
|
{:else}
|
||||||
<p><a href="{APP}/dashboard">Dashboard</a></p>
|
<p><a href="{APP}/dashboard">Dashboard</a></p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -15,25 +15,22 @@
|
||||||
|
|
||||||
<!-- -------------------------------------------------------------------------->
|
<!-- -------------------------------------------------------------------------->
|
||||||
<div id="login">
|
<div id="login">
|
||||||
{#await pr then dm}
|
{#await pr then dm} {#if dm.instanceOf === "KratosForm"}
|
||||||
{#if dm.instanceOf === "KratosForm"}
|
|
||||||
<div id="login">
|
<div id="login">
|
||||||
<h2>Sign in</h2>
|
<h2>Sign in</h2>
|
||||||
|
|
||||||
{#if dm.ui.messages}
|
{#if dm.ui.messages}
|
||||||
<Messages messages={dm.ui.messages} />
|
<Messages messages="{dm.ui.messages}" />
|
||||||
{/if}
|
{/if} <Form {dm} groups={["default", "password"]} />
|
||||||
<Form {dm} groups={["default", "password"]} />
|
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p><a href="{APP}/recovery">Forget password?</a></p>
|
<p><a href="{APP}/auth/recovery">Forget password?</a></p>
|
||||||
<p><a href="{APP}/registration">Don't have an account?</a></p>
|
<p><a href="{APP}/auth/registration">Don't have an account?</a></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<p>Something went wrong</p>
|
<p>Something went wrong</p>
|
||||||
{/if}
|
{/if} {/await}
|
||||||
{/await}
|
|
||||||
</div>
|
</div>
|
|
@ -7,12 +7,11 @@
|
||||||
import Messages from "$lib/components/kratos/messages.svelte";
|
import Messages from "$lib/components/kratos/messages.svelte";
|
||||||
|
|
||||||
const flowId = getFlowId($page.url.search);
|
const flowId = getFlowId($page.url.search);
|
||||||
console.log(browser, flowId);
|
|
||||||
if (browser && !flowId)
|
if (browser && !flowId)
|
||||||
window.location.href = `${KRATOS}/self-service/registration/browser`;
|
window.location.href = `${KRATOS}/self-service/registration/browser`;
|
||||||
|
|
||||||
const pr = getDataModels("registration", flowId);
|
const pr = getDataModels("registration", flowId);
|
||||||
console.log(pr);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- -------------------------------------------------------------------------->
|
<!-- -------------------------------------------------------------------------->
|
|
@ -14,6 +14,6 @@
|
||||||
<h2>Dashboard</h2>
|
<h2>Dashboard</h2>
|
||||||
|
|
||||||
<p>Hello {email}</p>
|
<p>Hello {email}</p>
|
||||||
<p><a href="{APP}/settings">Settings</a></p>
|
<p><a href="{APP}/auth/settings">Settings</a></p>
|
||||||
<p><a href="{APP}/logout">Logout</a></p>
|
<p><a href="{APP}/auth/logout">Logout</a></p>
|
||||||
</section>
|
</section>
|
||||||
|
|
Loading…
Reference in a new issue