Skip to content

Commit 844f7e6

Browse files
wixysamcursoragent
andauthored
Add Apple as supported authentication provider (#128)
* Add Apple as supported authentication provider in SDK documentation - Add Apple to loginWithProvider JSDoc with Sign in with Apple link - Include Apple in supported providers list - Add example showing Apple login usage Co-authored-by: Cursor <cursoragent@cursor.com> * Set SDK reference docs groups to expanded by default - Update file-processing.js to add expanded: true to generated groups - Update copy-to-local-docs.js to preserve expanded: true in nested groups - Ensures Client and Modules groups are open by default in docs Co-authored-by: Cursor <cursoragent@cursor.com> * Shorten example descriptions for loginWithProvider Changed from verbose descriptions to simple provider names (Google, Microsoft, Apple) Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent a2a1956 commit 844f7e6

3 files changed

Lines changed: 16 additions & 4 deletions

File tree

scripts/mintlify-post-processing/copy-to-local-docs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ function updateDocsJson(repoDir, sdkFiles) {
151151
const sdkReferencePages = Array.from(groupMap.entries()).map(
152152
([groupName, pages]) => ({
153153
group: groupName,
154+
expanded: true,
154155
pages: pages.sort(), // Sort pages alphabetically within each group
155156
})
156157
);

scripts/mintlify-post-processing/file-processing/file-processing.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,20 +361,23 @@ function generateDocsJson(docsContent) {
361361
if (docsContent.functions.length > 0 && categoryMap.functions) {
362362
groups.push({
363363
group: getGroupName("functions", categoryMap),
364+
expanded: true,
364365
pages: docsContent.functions,
365366
});
366367
}
367368

368369
if (docsContent.interfaces.length > 0 && categoryMap.interfaces) {
369370
groups.push({
370371
group: getGroupName("interfaces", categoryMap),
372+
expanded: true,
371373
pages: docsContent.interfaces,
372374
});
373375
}
374376

375377
if (docsContent.classes.length > 0 && categoryMap.classes) {
376378
groups.push({
377379
group: getGroupName("classes", categoryMap),
380+
expanded: true,
378381
pages: docsContent.classes,
379382
});
380383
}
@@ -391,6 +394,7 @@ function generateDocsJson(docsContent) {
391394
} else {
392395
groups.push({
393396
group: groupName,
397+
expanded: true,
394398
pages: docsContent.typeAliases,
395399
});
396400
}

src/modules/auth.types.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,22 +193,29 @@ export interface AuthModule {
193193
* Supported providers:
194194
* - `'google'` - {@link https://developers.google.com/identity/protocols/oauth2 | Google OAuth}. Enabled by default.
195195
* - `'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.
196-
* - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable this in your app's authentication settings before using.
196+
* - `'facebook'` - {@link https://developers.facebook.com/docs/facebook-login | Facebook Login}. Enable Facebook in your app's authentication settings before using.
197+
* - `'apple'` - {@link https://developer.apple.com/sign-in-with-apple/ | Sign in with Apple}. Enable Apple in your app's authentication settings before using this provider.
197198
*
198-
* @param provider - The authentication provider to use: `'google'`, `'microsoft'`, or `'facebook'`.
199+
* @param provider - The authentication provider to use: `'google'`, `'microsoft'`, `'facebook'`, or `'apple'`.
199200
* @param fromUrl - URL to redirect to after successful authentication. Defaults to `'/'`.
200201
*
201202
* @example
202203
* ```typescript
203-
* // Login with Google and return to current page
204+
* // Google
204205
* base44.auth.loginWithProvider('google', window.location.pathname);
205206
* ```
206207
*
207208
* @example
208209
* ```typescript
209-
* // Login with Microsoft and redirect to dashboard
210+
* // Microsoft
210211
* base44.auth.loginWithProvider('microsoft', '/dashboard');
211212
* ```
213+
*
214+
* @example
215+
* ```typescript
216+
* // Apple
217+
* base44.auth.loginWithProvider('apple', '/dashboard');
218+
* ```
212219
*/
213220
loginWithProvider(provider: string, fromUrl?: string): void;
214221

0 commit comments

Comments
 (0)