https://github.com/bessey/ory-kratos-sveltekit-demo
Demo Ory Kratos from a SvelteKit client, backend-for-frontend style
https://github.com/bessey/ory-kratos-sveltekit-demo
Last synced: 3 months ago
JSON representation
Demo Ory Kratos from a SvelteKit client, backend-for-frontend style
- Host: GitHub
- URL: https://github.com/bessey/ory-kratos-sveltekit-demo
- Owner: bessey
- License: mpl-2.0
- Created: 2024-04-29T17:40:15.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-29T18:15:59.000Z (about 1 year ago)
- Last Synced: 2024-04-30T19:01:34.033Z (about 1 year ago)
- Language: Svelte
- Size: 271 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ory - Ory Kratos SvelteKit example
- awesome-ory - Ory Kratos SvelteKit Demo
README
# Ory Kratos SvelteKit Demo
Adapted from [karlis-vagalis/kratos-selfservice](https://github.com/karlis-vagalis/kratos-selfservice).
This is a super fast and responsive self-service UI for open source user management system Ory Kratos built in SvelteKit.
### Features
- Disabled flows from Kratos config are considered (e.g. not showing Sign Up option, if Kratos config has that flow disabled)
- All flows supported: login, logout, signup, recovery, verification, settings
- Tested self-service methods: password (webauthn, code, totp also supported, but untested)
- Error, success and info messagesNot supported (at least yet)
- Languages other than English### Differences from [karlis-vagalis/kratos-selfservice](https://github.com/karlis-vagalis/kratos-selfservice).
- UI components from [shadcn-svelte](https://shadcn-svelte.com/) where possible, (Tailwind + BitsUI under the hood)
- TypeScript Svelte throughout
- Uses the official Ory Kratos client library for NodeJS, for improved typings
- Isolates each flow's logic in its route rather than colocating it all in one big `+layout.server.ts` + `+layout.svelte`
- Move all Kratos logic to `/identity` subdirectory, better aligned to an app where this might be a small part of a larger appThis is extracted from a personal project so apologies if it includes files / packages that are not actually needed.
I have made no effort to style beyond Shadcn's defaults, so it's not pretty. This is mostly intended as a reference
implementation for any future SvelteKit projects I or others might wish to use Kratos in.I have not tested the OIDC flows, so they may be broken.
