The package has been configured successfully!
Make sure to first define the mapping inside the contracts/ally.ts
file as follows.
import { FigmaDriver, FigmaDriverConfig } from 'adonis-ally-figma/build/standalone'
declare module '@ioc:Adonis/Addons/Ally' {
interface SocialProviders {
// ... other mappings
figma: {
config: FigmaDriverConfig
implementation: FigmaDriver
}
}
}
Make sure to add the driver inside the config/ally.ts
file as follows.
const allyConfig: AllyConfig = {
// ... other mappings
/*
|--------------------------------------------------------------------------
| Figma driver
|--------------------------------------------------------------------------
*/
figma: {
driver: 'figma',
clientId: Env.get('FIGMA_CLIENT_ID'),
clientSecret: Env.get('FIGMA_CLIENT_SECRET'),
callbackUrl: 'http://localhost:3333/figma/callback',
scopes: ['file_read']
},
}
}
Ally config relies on environment variables for the client id and secret. We recommend you to validate environment variables inside the env.ts
file.
FIGMA_CLIENT_ID: Env.schema.string(),
FIGMA_CLIENT_SECRET: Env.schema.string(),