Skip to content

Commit

Permalink
fix: quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
like-a-bause committed Mar 3, 2023
1 parent cd04a94 commit efe4228
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

2 changes: 1 addition & 1 deletion deploy/docker-compose/quickstart.debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
- HANKO_URL=http://localhost:8000
- HANKO_URL_INTERNAL=http://hanko:8000
- HANKO_ELEMENT_URL=http://localhost:9500/elements.js
- HANKO_FRONTEND_SDK_URL=http://localhost:9500/sdk.umd.js
- HANKO_FRONTEND_SDK_URL=http://localhost:9500/sdk.modern.js
networks:
- intranet
mailslurper:
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker-compose/quickstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ services:
- HANKO_URL=http://localhost:8000
- HANKO_URL_INTERNAL=http://hanko:8000
- HANKO_ELEMENT_URL=http://localhost:9500/elements.js
- HANKO_FRONTEND_SDK_URL=http://localhost:9500/sdk.umd.js
- HANKO_FRONTEND_SDK_URL=http://localhost:9500/sdk.modern.js
networks:
- intranet
mailslurper:
Expand Down
19 changes: 9 additions & 10 deletions quickstart/public/html/secured.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,21 @@ <h1>My Profile</h1>
<img alt="Powered by Hanko" src="static/img/poweredBy.svg"/>
</footer>


<script type="module">
import {register} from "{{.HankoElementUrl}}";
register({ shadow: false });
import { register } from "{{.HankoElementUrl}}";
import { Hanko } from "{{.HankoFrontendSdkUrl}}";

// TODO: Does this still work?
const hanko = new hankoFrontendSdk.Hanko("{{.HankoUrl}}")
register({ shadow: false });

const hanko = new Hanko("{{.HankoUrl}}")

document.getElementById("logout-link")
.addEventListener("click", (event) => {
event.preventDefault();
hanko.user.logout()
.then(() => { window.location.href = "/" })
.catch(console.error);
});
event.preventDefault();
hanko.user.logout()
.then(() => { window.location.href = "/" })
.catch(console.error);
});
</script>

</body>
Expand Down

0 comments on commit efe4228

Please sign in to comment.