ally.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /**
  2. * Config source: https://git.io/JOdi5
  3. *
  4. * Feel free to let us know via PR, if you find something broken in this config
  5. * file.
  6. */
  7. import Env from '@ioc:Adonis/Core/Env'
  8. import { AllyConfig } from '@ioc:Adonis/Addons/Ally'
  9. /*
  10. |--------------------------------------------------------------------------
  11. | Ally Config
  12. |--------------------------------------------------------------------------
  13. |
  14. | The `AllyConfig` relies on the `SocialProviders` interface which is
  15. | defined inside `contracts/ally.ts` file.
  16. |
  17. */
  18. const allyConfig: AllyConfig = {
  19. /*
  20. |--------------------------------------------------------------------------
  21. | Google driver
  22. |--------------------------------------------------------------------------
  23. */
  24. google: {
  25. driver: 'google',
  26. clientId: Env.get('GOOGLE_CLIENT_ID'),
  27. clientSecret: Env.get('GOOGLE_CLIENT_SECRET'),
  28. callbackUrl: 'http://localhost:3333/api/auth/google/callback'
  29. },
  30. /*
  31. |--------------------------------------------------------------------------
  32. | Facebook driver
  33. |--------------------------------------------------------------------------
  34. */
  35. facebook: {
  36. driver: 'facebook',
  37. clientId: Env.get('FACEBOOK_CLIENT_ID'),
  38. clientSecret: Env.get('FACEBOOK_CLIENT_SECRET'),
  39. callbackUrl: 'http://localhost:3333/api/auth/facebook/callback'
  40. }
  41. }
  42. export default allyConfig