SSO service written in SvelteKit (OAuth2 / OIDC)
https://secure.icynet.eu
.vscode | ||
private | ||
src | ||
static | ||
uploads | ||
.env.example | ||
.eslintignore | ||
.eslintrc.cjs | ||
.gitignore | ||
.npmrc | ||
.prettierignore | ||
.prettierrc | ||
drizzle.config.ts | ||
package-lock.json | ||
package.json | ||
README.md | ||
svelte.config.js | ||
tsconfig.json | ||
vite.config.ts |
sso-core
This is a SvelteKit-powered authentication service.
Set up
- Install dependenices -
npm install
. - Configure the environment -
cp .env.example .env
. - Generate secrets and stuff:
- Session secret -
node -e 'console.log(require("crypto").randomBytes(16).toString("hex"))'
. - Challenge secret -
node -e 'console.log(require("crypto").randomBytes(32).toString("hex"))'
. - Generate JWT keys in the
private
directory -openssl genpkey -out jwt.private.pem -algorithm RSA -pkeyopt rsa_keygen_bits:2048
. - Also make the public key -
openssl rsa -in jwt.private.pem -pubout -outform PEM -out jwt.public.pem
.
- Session secret -
- Build the application -
npm run build
. - Run the application -
node -r dotenv/config build
.