encrypts integration secrets
This commit is contained in:
@@ -3,12 +3,9 @@ import type { Integration } from "../integration";
|
||||
|
||||
const StravaSchema = z.object({
|
||||
clientId: z.number({ coerce: true }).int().positive(),
|
||||
clientSecret: z.string().length(40),
|
||||
clientSecret: z.string().length(40).optional().or(z.literal('')),
|
||||
routes: z.boolean(),
|
||||
activities: z.boolean(),
|
||||
accessToken: z.string().length(40).optional(),
|
||||
refreshToken: z.string().length(40).optional(),
|
||||
expiresAt: z.number().int().positive().optional(),
|
||||
active: z.boolean()
|
||||
})
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface BaseIntegration {
|
||||
|
||||
export interface StravaIntegration extends BaseIntegration {
|
||||
clientId: string | number;
|
||||
clientSecret: string;
|
||||
clientSecret?: string;
|
||||
routes: boolean;
|
||||
activities: boolean;
|
||||
accessToken?: string;
|
||||
|
||||
Reference in New Issue
Block a user