11import { NO_REQUIRED_CHARACTERS , urlRegex } from 'components/interfaces/Auth/Auth.constants'
22import { ProjectAuthConfigData } from 'data/auth/auth-config-query'
3+ import { DOCS_URL } from 'lib/constants'
34import { boolean , number , object , string } from 'yup'
45
56const parseBase64URL = ( b64url : string ) => {
@@ -12,7 +13,7 @@ const PROVIDER_EMAIL = {
1213 $schema : JSON_SCHEMA_VERSION ,
1314 type : 'object' ,
1415 title : 'Email' ,
15- link : 'https://supabase.com/docs/ guides/auth/passwords' ,
16+ link : ` ${ DOCS_URL } / guides/auth/passwords` ,
1617 properties : {
1718 EXTERNAL_EMAIL_ENABLED : {
1819 title : 'Enable Email provider' ,
@@ -95,7 +96,7 @@ const PROVIDER_EMAIL = {
9596 misc : {
9697 iconKey : 'email-icon2' ,
9798 helper : `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
98- [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-apple#configure-your-services-id)`,
99+ [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-apple#configure-your-services-id)` ,
99100 } ,
100101}
101102
@@ -217,7 +218,7 @@ export const PROVIDER_PHONE = {
217218 $schema : JSON_SCHEMA_VERSION ,
218219 type : 'object' ,
219220 title : 'Phone' ,
220- link : 'https://supabase.com/docs/ guides/auth/phone-login' ,
221+ link : ` ${ DOCS_URL } / guides/auth/phone-login` ,
221222 properties : {
222223 EXTERNAL_PHONE_ENABLED : {
223224 title : 'Enable Phone provider' ,
@@ -418,15 +419,15 @@ export const PROVIDER_PHONE = {
418419 misc : {
419420 iconKey : 'phone-icon4' ,
420421 helper : `To complete setup, add this authorisation callback URL to your app's configuration in the Apple Developer Console.
421- [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-apple#configure-your-services-id)`,
422+ [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-apple#configure-your-services-id)` ,
422423 } ,
423424}
424425
425426const EXTERNAL_PROVIDER_APPLE = {
426427 $schema : JSON_SCHEMA_VERSION ,
427428 type : 'object' ,
428429 title : 'Apple' ,
429- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-apple' ,
430+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-apple` ,
430431 properties : {
431432 EXTERNAL_APPLE_ENABLED : {
432433 title : 'Enable Sign in with Apple' ,
@@ -441,7 +442,7 @@ const EXTERNAL_PROVIDER_APPLE = {
441442 } ,
442443 EXTERNAL_APPLE_SECRET : {
443444 title : 'Secret Key (for OAuth)' ,
444- description : `Secret key used in the OAuth flow. [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-apple#generate-a-client_secret)` ,
445+ description : `Secret key used in the OAuth flow. [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-apple#generate-a-client_secret)` ,
445446 type : 'string' ,
446447 isSecret : true ,
447448 } ,
@@ -527,7 +528,7 @@ const EXTERNAL_PROVIDER_APPLE = {
527528 iconKey : 'apple-icon' ,
528529 requiresRedirect : true ,
529530 helper : `Register this callback URL when using Sign in with Apple on the web in the Apple Developer Center.
530- [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-apple#configure-your-services-id)`,
531+ [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-apple#configure-your-services-id)` ,
531532 alert : {
532533 title : `Apple OAuth secret keys expire every 6 months` ,
533534 description : `A new secret should be generated every 6 months, otherwise users on the web will not be able to sign in.` ,
@@ -539,7 +540,7 @@ const EXTERNAL_PROVIDER_AZURE = {
539540 $schema : JSON_SCHEMA_VERSION ,
540541 type : 'object' ,
541542 title : 'Azure' ,
542- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-azure' ,
543+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-azure` ,
543544 properties : {
544545 EXTERNAL_AZURE_ENABLED : {
545546 title : 'Azure enabled' ,
@@ -553,7 +554,7 @@ const EXTERNAL_PROVIDER_AZURE = {
553554 EXTERNAL_AZURE_SECRET : {
554555 // [TODO] Change docs
555556 title : 'Secret Value' ,
556- description : `Enter the data from Value, not the Secret ID. [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-azure#obtain-a-secret-id)` ,
557+ description : `Enter the data from Value, not the Secret ID. [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-azure#obtain-a-secret-id)` ,
557558 type : 'string' ,
558559 isSecret : true ,
559560 } ,
@@ -588,7 +589,7 @@ const EXTERNAL_PROVIDER_BITBUCKET = {
588589 $schema : JSON_SCHEMA_VERSION ,
589590 type : 'object' ,
590591 title : 'Bitbucket' ,
591- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-bitbucket' ,
592+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-bitbucket` ,
592593 properties : {
593594 EXTERNAL_BITBUCKET_ENABLED : {
594595 title : 'Bitbucket enabled' ,
@@ -627,7 +628,7 @@ const EXTERNAL_PROVIDER_DISCORD = {
627628 $schema : JSON_SCHEMA_VERSION ,
628629 type : 'object' ,
629630 title : 'Discord' ,
630- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-discord?' ,
631+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-discord?` ,
631632 properties : {
632633 EXTERNAL_DISCORD_ENABLED : {
633634 title : 'Discord enabled' ,
@@ -666,7 +667,7 @@ const EXTERNAL_PROVIDER_FACEBOOK = {
666667 $schema : JSON_SCHEMA_VERSION ,
667668 type : 'object' ,
668669 title : 'Facebook' ,
669- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-facebook' ,
670+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-facebook` ,
670671 properties : {
671672 EXTERNAL_FACEBOOK_ENABLED : {
672673 title : 'Facebook enabled' ,
@@ -705,7 +706,7 @@ const EXTERNAL_PROVIDER_FIGMA = {
705706 $schema : JSON_SCHEMA_VERSION ,
706707 type : 'object' ,
707708 title : 'Figma' ,
708- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-figma' ,
709+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-figma` ,
709710 properties : {
710711 EXTERNAL_FIGMA_ENABLED : {
711712 title : 'Figma enabled' ,
@@ -744,7 +745,7 @@ const EXTERNAL_PROVIDER_GITHUB = {
744745 $schema : JSON_SCHEMA_VERSION ,
745746 type : 'object' ,
746747 title : 'GitHub' ,
747- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-github' ,
748+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-github` ,
748749 properties : {
749750 EXTERNAL_GITHUB_ENABLED : {
750751 title : 'GitHub enabled' ,
@@ -783,7 +784,7 @@ const EXTERNAL_PROVIDER_GITLAB = {
783784 $schema : JSON_SCHEMA_VERSION ,
784785 type : 'object' ,
785786 title : 'GitLab' ,
786- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-gitlab' ,
787+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-gitlab` ,
787788 properties : {
788789 EXTERNAL_GITLAB_ENABLED : {
789790 title : 'GitLab enabled' ,
@@ -830,7 +831,7 @@ const EXTERNAL_PROVIDER_GOOGLE = {
830831 $schema : JSON_SCHEMA_VERSION ,
831832 type : 'object' ,
832833 title : 'Google' ,
833- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-google' ,
834+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-google` ,
834835 properties : {
835836 EXTERNAL_GOOGLE_ENABLED : {
836837 title : 'Enable Sign in with Google' ,
@@ -884,15 +885,15 @@ const EXTERNAL_PROVIDER_GOOGLE = {
884885 iconKey : 'google-icon' ,
885886 requiresRedirect : true ,
886887 helper : `Register this callback URL when using Sign-in with Google on the web using OAuth.
887- [Learn more](https://supabase.com/docs /guides/auth/social-login/auth-google#configure-your-services-id)`,
888+ [Learn more](${ DOCS_URL } /guides/auth/social-login/auth-google#configure-your-services-id)` ,
888889 } ,
889890}
890891
891892const EXTERNAL_PROVIDER_KAKAO = {
892893 $schema : JSON_SCHEMA_VERSION ,
893894 type : 'object' ,
894895 title : 'Kakao' ,
895- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-kakao' ,
896+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-kakao` ,
896897 properties : {
897898 EXTERNAL_KAKAO_ENABLED : {
898899 title : 'Kakao enabled' ,
@@ -934,7 +935,7 @@ const EXTERNAL_PROVIDER_KEYCLOAK = {
934935 $schema : JSON_SCHEMA_VERSION ,
935936 type : 'object' ,
936937 title : 'KeyCloak' ,
937- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-keycloak' ,
938+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-keycloak` ,
938939 properties : {
939940 EXTERNAL_KEYCLOAK_ENABLED : {
940941 title : 'Keycloak enabled' ,
@@ -985,7 +986,7 @@ const EXTERNAL_PROVIDER_LINKEDIN_OIDC = {
985986 type : 'object' ,
986987 key : 'linkedin_oidc' ,
987988 title : 'LinkedIn (OIDC)' ,
988- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-linkedin' ,
989+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-linkedin` ,
989990 properties : {
990991 EXTERNAL_LINKEDIN_OIDC_ENABLED : {
991992 title : 'LinkedIn enabled' ,
@@ -1024,7 +1025,7 @@ const EXTERNAL_PROVIDER_NOTION = {
10241025 $schema : JSON_SCHEMA_VERSION ,
10251026 type : 'object' ,
10261027 title : 'Notion' ,
1027- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-notion' ,
1028+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-notion` ,
10281029 properties : {
10291030 EXTERNAL_NOTION_ENABLED : {
10301031 title : 'Notion enabled' ,
@@ -1063,7 +1064,7 @@ const EXTERNAL_PROVIDER_TWITCH = {
10631064 $schema : JSON_SCHEMA_VERSION ,
10641065 type : 'object' ,
10651066 title : 'Twitch' ,
1066- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-twitch' ,
1067+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-twitch` ,
10671068 properties : {
10681069 EXTERNAL_TWITCH_ENABLED : {
10691070 title : 'Twitch enabled' ,
@@ -1102,7 +1103,7 @@ const EXTERNAL_PROVIDER_TWITTER = {
11021103 $schema : JSON_SCHEMA_VERSION ,
11031104 type : 'object' ,
11041105 title : 'Twitter' ,
1105- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-twitter' ,
1106+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-twitter` ,
11061107 properties : {
11071108 EXTERNAL_TWITTER_ENABLED : {
11081109 title : 'Twitter enabled' ,
@@ -1141,7 +1142,7 @@ const EXTERNAL_PROVIDER_SLACK = {
11411142 $schema : JSON_SCHEMA_VERSION ,
11421143 type : 'object' ,
11431144 title : 'Slack (Deprecated)' ,
1144- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-slack' ,
1145+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-slack` ,
11451146 properties : {
11461147 EXTERNAL_SLACK_ENABLED : {
11471148 title : 'Slack enabled' ,
@@ -1181,7 +1182,7 @@ const EXTERNAL_PROVIDER_SLACK_OIDC = {
11811182 type : 'object' ,
11821183 title : 'Slack (OIDC)' ,
11831184 key : 'slack_oidc' ,
1184- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-slack' ,
1185+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-slack` ,
11851186 properties : {
11861187 EXTERNAL_SLACK_OIDC_ENABLED : {
11871188 title : 'Slack enabled' ,
@@ -1220,7 +1221,7 @@ const EXTERNAL_PROVIDER_SPOTIFY = {
12201221 $schema : JSON_SCHEMA_VERSION ,
12211222 type : 'object' ,
12221223 title : 'Spotify' ,
1223- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-spotify' ,
1224+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-spotify` ,
12241225 properties : {
12251226 EXTERNAL_SPOTIFY_ENABLED : {
12261227 title : 'Spotify enabled' ,
@@ -1259,7 +1260,7 @@ const EXTERNAL_PROVIDER_WORKOS = {
12591260 $schema : JSON_SCHEMA_VERSION ,
12601261 type : 'object' ,
12611262 title : 'WorkOS' ,
1262- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-workos' ,
1263+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-workos` ,
12631264 properties : {
12641265 EXTERNAL_WORKOS_ENABLED : {
12651266 title : 'WorkOS enabled' ,
@@ -1309,7 +1310,7 @@ const EXTERNAL_PROVIDER_ZOOM = {
13091310 $schema : JSON_SCHEMA_VERSION ,
13101311 type : 'object' ,
13111312 title : 'Zoom' ,
1312- link : 'https://supabase.com/docs/ guides/auth/social-login/auth-zoom' ,
1313+ link : ` ${ DOCS_URL } / guides/auth/social-login/auth-zoom` ,
13131314 properties : {
13141315 EXTERNAL_ZOOM_ENABLED : {
13151316 title : 'Zoom enabled' ,
@@ -1348,12 +1349,11 @@ const PROVIDER_SAML = {
13481349 $schema : JSON_SCHEMA_VERSION ,
13491350 type : 'object' ,
13501351 title : 'SAML 2.0' ,
1351- link : 'https://supabase.com/docs/ guides/auth/enterprise-sso/auth-sso-saml' ,
1352+ link : ` ${ DOCS_URL } / guides/auth/enterprise-sso/auth-sso-saml` ,
13521353 properties : {
13531354 SAML_ENABLED : {
13541355 title : 'Enable SAML 2.0 Single Sign-on' ,
1355- description :
1356- 'You will need to use the [Supabase CLI](https://supabase.com/docs/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to set up SAML after enabling it' ,
1356+ description : `You will need to use the [Supabase CLI](${ DOCS_URL } /guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to set up SAML after enabling it` ,
13571357 type : 'boolean' ,
13581358 } ,
13591359 SAML_EXTERNAL_URL : {
@@ -1385,7 +1385,7 @@ const PROVIDER_WEB3 = {
13851385 $schema : JSON_SCHEMA_VERSION ,
13861386 type : 'object' ,
13871387 title : 'Web3 Wallet' ,
1388- link : 'https://supabase.com/docs/ guides/auth/auth-web3' ,
1388+ link : ` ${ DOCS_URL } / guides/auth/auth-web3` ,
13891389 properties : {
13901390 EXTERNAL_WEB3_ETHEREUM_ENABLED : {
13911391 title : 'Enable Sign in with Ethereum' ,
0 commit comments