From 779166a89592113fd7d361518140974ed6b56a94 Mon Sep 17 00:00:00 2001 From: SimonC24 Date: Sun, 25 Jan 2026 11:03:20 +0200 Subject: [PATCH 1/2] Login with provider docs --- src/modules/auth.types.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index 1390535..e6ca7b9 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -188,11 +188,15 @@ export interface AuthModule { /** * Redirects the user to a third-party authentication provider's login page. * - * Initiates OAuth/SSO login flow with providers like Google, Microsoft, etc. Requires a browser environment and can't be used in the backend. + * Initiates an OAuth login flow with one of the built-in providers. Requires a browser environment and can't be used in the backend. * - * @internal - * @param provider - Name of the supported authentication provider (e.g., 'google', 'microsoft'). - * @param fromUrl - URL to redirect to after successful authentication. Defaults to '/'. + * Supported providers: + * - `'google'` - {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default. + * - `'microsoft'` - {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable this in your app's authentication settings before using. + * - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable this in your app's authentication settings before using. + * + * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, or `'facebook'`. + * @param fromUrl - URL to redirect to after successful authentication. Defaults to `'/'`. * * @example * ```typescript @@ -202,10 +206,9 @@ export interface AuthModule { * * @example * ```typescript - * // Login with GitHub and redirect to dashboard + * // Login with Microsoft and redirect to dashboard * base44.auth.loginWithProvider('microsoft', '/dashboard'); * ``` - * @internal */ loginWithProvider(provider: string, fromUrl?: string): void; From fe8040e3641310a9bba0e261ee83de2444062b50 Mon Sep 17 00:00:00 2001 From: SimonC24 Date: Sun, 25 Jan 2026 12:18:13 +0200 Subject: [PATCH 2/2] Apply suggestion from @christopherbWIX Co-authored-by: christopherbWIX --- src/modules/auth.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/auth.types.ts b/src/modules/auth.types.ts index e6ca7b9..48d5101 100644 --- a/src/modules/auth.types.ts +++ b/src/modules/auth.types.ts @@ -192,7 +192,7 @@ export interface AuthModule { * * Supported providers: * - `'google'` - {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default. - * - `'microsoft'` - {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable this in your app's authentication settings before using. + * - `'microsoft'` - {@link https://learn.microsoft.com/en-us/entra/identity-platform/v2-oauth2-auth-code-flow | Microsoft OAuth}. Enable Microsoft in your app's authentication settings before specifying this provider. * - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable this in your app's authentication settings before using. * * @param provider - The authentication provider to use: `'google'`, `'microsoft'`, or `'facebook'`.