Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/new-deer-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'@clerk/shared': patch
'@clerk/types': patch
---

The `SAML_IDPS` export was moved from `@clerk/types` to `@clerk/shared/saml` and was marked as deprecated.

Please use `import { SAML_IDPS } from "@clerk/shared/saml"` instead.
1 change: 1 addition & 0 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@
"object",
"oauth",
"web3",
"saml",
"getEnvVariable",
"pathMatcher",
"organization",
Expand Down
20 changes: 20 additions & 0 deletions packages/shared/src/saml.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { SamlIdpMap } from '@clerk/types';

export const SAML_IDPS: SamlIdpMap = {
saml_okta: {
name: 'Okta Workforce',
logo: 'okta',
},
saml_google: {
name: 'Google Workspace',
logo: 'google',
},
saml_microsoft: {
name: 'Microsoft Entra ID (Formerly AD)',
logo: 'azure',
},
saml_custom: {
name: 'SAML',
logo: 'saml',
},
};
3 changes: 1 addition & 2 deletions packages/types/src/authConfig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { PhoneCodeChannel } from 'phoneCodeChannel';

import type { PhoneCodeChannel } from './phoneCodeChannel';
import type { ClerkResource } from './resource';
import type { AuthConfigJSONSnapshot } from './snapshots';

Expand Down
3 changes: 1 addition & 2 deletions packages/types/src/commerceSettings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import type { CommerceSettingsJSONSnapshot } from 'snapshots';

import type { ClerkResourceJSON } from './json';
import type { ClerkResource } from './resource';
import type { CommerceSettingsJSONSnapshot } from './snapshots';

export interface CommerceSettingsJSON extends ClerkResourceJSON {
billing: {
Expand Down
5 changes: 2 additions & 3 deletions packages/types/src/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import type { OrganizationCustomRoleKey } from 'organizationMembership';
import type { SignInResource } from 'signIn';

import type { SetActive, SignOut } from './clerk';
import type { ActClaim, JwtPayload } from './jwtv2';
import type { OrganizationCustomRoleKey } from './organizationMembership';
import type {
CheckAuthorizationWithCustomPermissions,
GetToken,
SessionResource,
SignedInSessionResource,
} from './session';
import type { SignInResource } from './signIn';
import type { SignUpResource } from './signUp';
import type { UserResource } from './user';

Expand Down
4 changes: 4 additions & 0 deletions packages/types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ export * from './redirects';
export * from './resource';
export * from './role';
export * from './router';
/**
* TODO @revamp-hooks: Drop this in the next major release.
*/
export * from './runtime-values';
export * from './saml';
export * from './samlAccount';
export * from './samlConnection';
Expand Down
218 changes: 0 additions & 218 deletions packages/types/src/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,221 +69,3 @@ export type OAuthProvider =
| EnstallOauthProvider
| HuggingfaceOAuthProvider
| CustomOauthProvider;

/**
* @deprecated Use `import { OAUTH_PROVIDERS } from "@clerk/shared/oauth"` instead.
*
* @hidden
*/
export const OAUTH_PROVIDERS: OAuthProviderData[] = [
{
provider: 'google',
strategy: 'oauth_google',
name: 'Google',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/google',
},
{
provider: 'discord',
strategy: 'oauth_discord',
name: 'Discord',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/discord',
},
{
provider: 'facebook',
strategy: 'oauth_facebook',
name: 'Facebook',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/facebook',
},
{
provider: 'twitch',
strategy: 'oauth_twitch',
name: 'Twitch',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/twitch',
},
{
provider: 'twitter',
strategy: 'oauth_twitter',
name: 'Twitter',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/twitter',
},
{
provider: 'microsoft',
strategy: 'oauth_microsoft',
name: 'Microsoft',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/microsoft',
},
{
provider: 'tiktok',
strategy: 'oauth_tiktok',
name: 'TikTok',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/tiktok',
},
{
provider: 'linkedin',
strategy: 'oauth_linkedin',
name: 'LinkedIn',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/linkedin',
},
{
provider: 'linkedin_oidc',
strategy: 'oauth_linkedin_oidc',
name: 'LinkedIn',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/linkedin-oidc',
},
{
provider: 'github',
strategy: 'oauth_github',
name: 'GitHub',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/github',
},
{
provider: 'gitlab',
strategy: 'oauth_gitlab',
name: 'GitLab',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/gitlab',
},
{
provider: 'dropbox',
strategy: 'oauth_dropbox',
name: 'Dropbox',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/dropbox',
},
{
provider: 'atlassian',
strategy: 'oauth_atlassian',
name: 'Atlassian',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/atlassian',
},
{
provider: 'bitbucket',
strategy: 'oauth_bitbucket',
name: 'Bitbucket',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/bitbucket',
},
{
provider: 'hubspot',
strategy: 'oauth_hubspot',
name: 'HubSpot',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/hubspot',
},
{
provider: 'notion',
strategy: 'oauth_notion',
name: 'Notion',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/notion',
},
{
provider: 'apple',
strategy: 'oauth_apple',
name: 'Apple',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/apple',
},
{
provider: 'line',
strategy: 'oauth_line',
name: 'LINE',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/line',
},
{
provider: 'instagram',
strategy: 'oauth_instagram',
name: 'Instagram',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/instagram',
},
{
provider: 'coinbase',
strategy: 'oauth_coinbase',
name: 'Coinbase',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/coinbase',
},
{
provider: 'spotify',
strategy: 'oauth_spotify',
name: 'Spotify',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/spotify',
},
{
provider: 'xero',
strategy: 'oauth_xero',
name: 'Xero',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/xero',
},
{
provider: 'box',
strategy: 'oauth_box',
name: 'Box',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/box',
},
{
provider: 'slack',
strategy: 'oauth_slack',
name: 'Slack',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/slack',
},
{
provider: 'linear',
strategy: 'oauth_linear',
name: 'Linear',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/linear',
},
{
provider: 'x',
strategy: 'oauth_x',
name: 'X / Twitter',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/x-twitter-v2',
},
{
provider: 'enstall',
strategy: 'oauth_enstall',
name: 'Enstall',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/enstall',
},
{
provider: 'huggingface',
strategy: 'oauth_huggingface',
name: 'Hugging Face',
docsUrl: 'https://clerk.com/docs/authentication/social-connections/huggingface',
},
];

interface getOAuthProviderDataProps {
provider?: OAuthProvider;
strategy?: OAuthStrategy;
}

/**
* @deprecated This utility will be dropped in the next major release.
*
* @hidden
*/
export function getOAuthProviderData({
provider,
strategy,
}: getOAuthProviderDataProps): OAuthProviderData | undefined | null {
if (provider) {
return OAUTH_PROVIDERS.find(oauth_provider => oauth_provider.provider == provider);
}

return OAUTH_PROVIDERS.find(oauth_provider => oauth_provider.strategy == strategy);
}

/**
* @deprecated This utility will be dropped in the next major release.
*
* @hidden
*/
export function sortedOAuthProviders(sortingArray: OAuthStrategy[]) {
return OAUTH_PROVIDERS.slice().sort((a, b) => {
let aPos = sortingArray.indexOf(a.strategy);
if (aPos == -1) {
aPos = Number.MAX_SAFE_INTEGER;
}

let bPos = sortingArray.indexOf(b.strategy);
if (bPos == -1) {
bPos = Number.MAX_SAFE_INTEGER;
}

return aPos - bPos;
});
}
3 changes: 1 addition & 2 deletions packages/types/src/phoneNumber.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { PhoneCodeChannel } from 'phoneCodeChannel';

import type { IdentificationLinkResource } from './identificationLink';
import type { PhoneCodeChannel } from './phoneCodeChannel';
import type { ClerkResource } from './resource';
import type { PhoneNumberJSONSnapshot } from './snapshots';
import type { PhoneCodeStrategy } from './strategies';
Expand Down
Loading
Loading