remote-auth.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. return [
  3. 'mastodon' => [
  4. 'enabled' => env('PF_LOGIN_WITH_MASTODON_ENABLED', false),
  5. 'ignore_closed_state' => env('PF_LOGIN_WITH_MASTODON_ENABLED_SKIP_CLOSED', false),
  6. 'contraints' => [
  7. /*
  8. * Skip email verification
  9. *
  10. * To improve the onboarding experience, you can opt to skip the email
  11. * verification process and automatically verify their email
  12. */
  13. 'skip_email_verification' => env('PF_LOGIN_WITH_MASTODON_SKIP_EMAIL', true),
  14. ],
  15. 'domains' => [
  16. 'default' => 'mastodon.social,mastodon.online,mstdn.social,mas.to',
  17. /*
  18. * Custom mastodon domains
  19. *
  20. * Define a comma separated list of custom domains to allow
  21. */
  22. 'custom' => env('PF_LOGIN_WITH_MASTODON_DOMAINS'),
  23. /*
  24. * Use only default domains
  25. *
  26. * Allow Sign-in with Mastodon using only the default domains
  27. */
  28. 'only_default' => env('PF_LOGIN_WITH_MASTODON_ONLY_DEFAULT', false),
  29. /*
  30. * Use only custom domains
  31. *
  32. * Allow Sign-in with Mastodon using only the custom domains
  33. * you define, in comma separated format
  34. */
  35. 'only_custom' => env('PF_LOGIN_WITH_MASTODON_ONLY_CUSTOM', false),
  36. ],
  37. 'max_uses' => [
  38. /*
  39. * Max Uses
  40. *
  41. * Using a centralized service operated by pixelfed.org that tracks mastodon imports,
  42. * you can set a limit of how many times a mastodon account can be imported across
  43. * all known and reporting Pixelfed instances to prevent the same masto account from
  44. * abusing this
  45. */
  46. 'enabled' => env('PF_LOGIN_WITH_MASTODON_ENFORCE_MAX_USES', true),
  47. 'limit' => env('PF_LOGIN_WITH_MASTODON_MAX_USES_LIMIT', 3)
  48. ]
  49. ],
  50. 'oidc' => [
  51. /*
  52. * Enable OIDC authentication
  53. *
  54. * Enable Sign-in with OpenID Connect (OIDC) authentication providers
  55. */
  56. 'enabled' => env('PF_OIDC_ENABLED', false),
  57. /*
  58. * Client ID
  59. *
  60. * The client ID provided by your OIDC provider
  61. */
  62. 'clientId' => env('PF_OIDC_CLIENT_ID', false),
  63. /*
  64. * Client Secret
  65. *
  66. * The client secret provided by your OIDC provider
  67. */
  68. 'clientSecret' => env('PF_OIDC_CLIENT_SECRET', false),
  69. /*
  70. * OAuth Scopes
  71. *
  72. * The scopes to request from the OIDC provider, typically including
  73. * 'openid' (required), 'profile', and 'email' for basic user information
  74. */
  75. 'scopes' => env('PF_OIDC_SCOPES', 'openid profile email'),
  76. /*
  77. * Authorization URL
  78. *
  79. * The endpoint used to start the OIDC authentication flow
  80. */
  81. 'authorizeURL' => env('PF_OIDC_AUTHORIZE_URL', ''),
  82. /*
  83. * Token URL
  84. *
  85. * The endpoint used to exchange the authorization code for an access token
  86. */
  87. 'tokenURL' => env('PF_OIDC_TOKEN_URL', ''),
  88. /*
  89. * Profile URL
  90. *
  91. * The endpoint used to retrieve user information with a valid access token
  92. */
  93. 'profileURL' => env('PF_OIDC_PROFILE_URL', ''),
  94. /*
  95. * Logout URL
  96. *
  97. * The endpoint used to log the user out of the OIDC provider
  98. */
  99. 'logoutURL' => env('PF_OIDC_LOGOUT_URL', ''),
  100. /*
  101. * Username Field
  102. *
  103. * The field from the OIDC profile response to use as the username
  104. * Default is 'preferred_username' but can be changed based on your provider
  105. */
  106. 'field_username' => env('PF_OIDC_USERNAME_FIELD', "preferred_username"),
  107. /*
  108. * ID Field
  109. *
  110. * The field from the OIDC profile response to use as the unique identifier
  111. * Default is 'sub' (subject) which is standard in OIDC implementations
  112. */
  113. 'field_id' => env('PF_OIDC_FIELD_ID', 'sub'),
  114. ],
  115. ];