@clerk/types
Advanced tools
Comparing version 1.12.0 to 1.13.0
@@ -143,2 +143,8 @@ import { ClientResource } from './client'; | ||
/** | ||
* Completes an OAuth flow started by {@link Clerk.client.signIn.authenticateWithRedirect} or {@link Clerk.client.signUp.authenticateWithRedirect} | ||
* | ||
* @param returnBack will appends a query string paramater to the sign-in URL so the user can be redirected back to the current page. Defaults to false. | ||
*/ | ||
handleRedirectCallback: (params: HandleOAuthCallbackParams, customNavigate?: (to: string) => Promise<unknown>) => Promise<unknown>; | ||
/** | ||
* Redirects to the configured sign-up URL. Retrieved from {@link environment}. | ||
@@ -154,2 +160,13 @@ * | ||
} | ||
export declare type HandleOAuthCallbackParams = { | ||
secondFactorUrl?: string; | ||
} & ({ | ||
afterSignInUrl?: string | null; | ||
afterSignUpUrl?: string | null; | ||
redirectTo?: never; | ||
} | { | ||
afterSignInUrl?: never; | ||
afterSignUpUrl?: never; | ||
redirectTo?: string | null; | ||
}); | ||
export declare type CustomNavigation = (to: string) => Promise<unknown> | void; | ||
@@ -156,0 +173,0 @@ export interface ClerkOptions { |
@@ -12,6 +12,17 @@ export declare type OAuthProvider = 'facebook' | 'google' | 'hubspot' | 'github' | 'tiktok'; | ||
export declare type AuthenticateWithRedirectParams = { | ||
/** | ||
* One of the supported OAuth providers you can use to authenticate with, eg 'oauth_google'. | ||
*/ | ||
strategy: OAuthStrategy; | ||
/** | ||
* Full URL or path to the route that will complete the OAuth flow. | ||
* Typically, this will be a simple `/sso-callback` route that calls `Clerk.handleRedirectCallback` | ||
* or mounts the <AuthenticateWithRedirectCallback /> component. | ||
*/ | ||
callbackUrl: string; | ||
/** | ||
* Full URL or path to navigate after the OAuth flow completes. | ||
*/ | ||
callbackUrlComplete: string; | ||
}; | ||
//# sourceMappingURL=oauth.d.ts.map |
{ | ||
"name": "@clerk/types", | ||
"version": "1.12.0", | ||
"version": "1.13.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Clerk.dev Types", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95651
1419