Skip to content
Snippets Groups Projects
Commit 6f189cd3 authored by Emmanuel Raviart's avatar Emmanuel Raviart
Browse files

Prettify.

parent 094202cf
No related branches found
No related tags found
No related merge requests found
import { SvelteKitAuth } from "sk-auth" import { SvelteKitAuth } from "sk-auth"
import { import { OAuth2Provider } from "sk-auth/providers"
OAuth2Provider,
} from "sk-auth/providers"
import config from "$lib/server/config" import config from "$lib/server/config"
import type { User } from "$lib/users" import type { User } from "$lib/users"
...@@ -22,7 +20,10 @@ interface Tokens { ...@@ -22,7 +20,10 @@ interface Tokens {
const { baseUrl, oauth2 } = config const { baseUrl, oauth2 } = config
export const oauth2Authenticator = oauth2 === undefined ? undefined : new SvelteKitAuth({ export const oauth2Authenticator =
oauth2 === undefined
? undefined
: new SvelteKitAuth({
basePath: "/authentication", basePath: "/authentication",
// callbacks: { // callbacks: {
// jwt(token, profile) { // jwt(token, profile) {
...@@ -43,8 +44,7 @@ export const oauth2Authenticator = oauth2 === undefined ? undefined : new Svelte ...@@ -43,8 +44,7 @@ export const oauth2Authenticator = oauth2 === undefined ? undefined : new Svelte
host: baseUrl, host: baseUrl,
jwtSecret: oauth2.jwtSecret, jwtSecret: oauth2.jwtSecret,
providers: [ providers: [
new OAuth2Provider<Profile, Tokens>( new OAuth2Provider<Profile, Tokens>({
{
accessTokenUrl: oauth2.accessTokenUrl, accessTokenUrl: oauth2.accessTokenUrl,
// authorizationParams?: any; // authorizationParams?: any;
authorizationUrl: oauth2.authorizationUrl, authorizationUrl: oauth2.authorizationUrl,
...@@ -65,4 +65,4 @@ export const oauth2Authenticator = oauth2 === undefined ? undefined : new Svelte ...@@ -65,4 +65,4 @@ export const oauth2Authenticator = oauth2 === undefined ? undefined : new Svelte
}, },
}), }),
], ],
}); })
\ No newline at end of file
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
"compilerOptions": { "compilerOptions": {
"moduleResolution": "node", "moduleResolution": "node",
"module": "es2020", "module": "es2020",
"lib": [ "lib": ["es2020", "DOM"],
"es2020",
"DOM"
],
"target": "es2019", "target": "es2019",
/** /**
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
...@@ -26,18 +23,9 @@ ...@@ -26,18 +23,9 @@
"allowJs": true, "allowJs": true,
"checkJs": true, "checkJs": true,
"paths": { "paths": {
"$lib": [ "$lib": ["src/lib"],
"src/lib" "$lib/*": ["src/lib/*"]
],
"$lib/*": [
"src/lib/*"
]
} }
}, },
"include": [ "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
"src/**/*.d.ts",
"src/**/*.js",
"src/**/*.ts",
"src/**/*.svelte"
]
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment