Skip to content
Snippets Groups Projects

Ajoute la CSG retraite

Open
sandcharequested to merge
add-csg-retraite into master
2 open threads
2 files
+ 61
51
Compare changes
  • Side-by-side
  • Inline

Files

+ 47
47
@@ -24,52 +24,52 @@ export const oauth2Authenticator =
oauth2 === undefined
? undefined
: new SvelteKitAuth({
basePath: "/authentication",
// callbacks: {
// jwt(token, profile) {
// if (profile !== undefined) {
// // const { provider, ...account } = profile
// token = {
// ...token,
// user: {
// ...(token.user ?? {}),
// ...profile,
// },
// // user: {
// // ...(token.user ?? {}),
// // connections: {
// // ...(token.user?.connections ?? {}),
// // [provider]: account,
// // },
// // },
// }
// }
basePath: "/authentication",
// callbacks: {
// jwt(token, profile) {
// if (profile !== undefined) {
// // const { provider, ...account } = profile
// token = {
// ...token,
// user: {
// ...(token.user ?? {}),
// ...profile,
// },
// // user: {
// // ...(token.user ?? {}),
// // connections: {
// // ...(token.user?.connections ?? {}),
// // [provider]: account,
// // },
// // },
// }
// }
// return token
// },
// },
host: baseUrl,
jwtSecret: oauth2.jwtSecret,
providers: [
new OAuth2Provider<Profile, Tokens>({
accessTokenUrl: oauth2.accessTokenUrl,
// authorizationParams?: any;
authorizationUrl: oauth2.authorizationUrl,
clientId: oauth2.clientId,
clientSecret: oauth2.clientSecret,
// contentType: "application/json",
contentType: "application/x-www-form-urlencoded",
// grantType: "authorization_code",
// headers?: any;
id: "leximpact",
// params: any;
profileUrl: oauth2.profileUrl,
// responseType: "code",
scope: ["openid", "profile", "email"],
// return token
// },
// },
host: baseUrl,
jwtSecret: oauth2.jwtSecret,
providers: [
new OAuth2Provider<Profile, Tokens>({
accessTokenUrl: oauth2.accessTokenUrl,
// authorizationParams?: any;
authorizationUrl: oauth2.authorizationUrl,
clientId: oauth2.clientId,
clientSecret: oauth2.clientSecret,
// contentType: "application/json",
contentType: "application/x-www-form-urlencoded",
// grantType: "authorization_code",
// headers?: any;
id: "leximpact",
// params: any;
profileUrl: oauth2.profileUrl,
// responseType: "code",
scope: ["openid", "profile", "email"],
profile(profile) {
return { ...profile, provider: "leximpact" }
},
}),
],
})
profile(profile) {
return { ...profile, provider: "leximpact" }
},
}),
],
})
Loading