Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.02 KB

instructions.md

File metadata and controls

40 lines (32 loc) · 1.02 KB

The package has been configured successfully.

Make sure to first define the mapping inside the contracts/ally.ts file as follows.

declare module '@ioc:Adonis/Addons/Ally' {
  import { BitbucketDriver, BitbucketDriverConfig } from 'adonis-ally-bitbucket/build/standalone'

  interface SocialProviders {
    // ... other mappings
    bitbucket: {
      config: BitbucketDriverConfig
      implementation: BitbucketDriver
    }
  }
}

Ally config relies on environment variables for the client id and secret. We recommend you to validate environment variables inside the env.ts file.

Variables for Bitbucket driver

BITBUCKET_CLIENT_ID: Env.schema.string(),
BITBUCKET_CLIENT_SECRET: Env.schema.string(),

Ally config for Bitbucket driver

const allyConfig: AllyConfig = {
  // ... other drivers
  bitbucket: {
    driver: 'bitbucket',
    clientId: Env.get('BITBUCKET_CLIENT_ID'),
    clientSecret: Env.get('BITBUCKET_CLIENT_SECRET'),
    callbackUrl: 'http://localhost:3333/bitbucket/callback',
  },
}