Skip to content

feat(plugin): add expo config plugin for google auth#4

Merged
sbaiahmed1 merged 3 commits intomainfrom
feat/expo-plugin-dev
Sep 21, 2025
Merged

feat(plugin): add expo config plugin for google auth#4
sbaiahmed1 merged 3 commits intomainfrom
feat/expo-plugin-dev

Conversation

@sbaiahmed1
Copy link
Copy Markdown
Owner

@sbaiahmed1 sbaiahmed1 commented Sep 17, 2025

Closes : #3

  • Plugin setup with TypeScript
  • Configuration for iOS Info.plist and Android manifest
  • Client ID handling from Google services files
  • Workspace and package configuration updates

- Plugin setup with TypeScript
- Configuration for iOS Info.plist and Android manifest
- Client ID handling from Google services files
- Workspace and package configuration updates
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Sep 17, 2025

Reviewer's Guide

This PR introduces a TypeScript-based Expo Config Plugin for react-native-google-auth, wiring up native iOS and Android projects by copying Google config files, auto-detecting client IDs, and injecting URL schemes, GIDClientID keys and permissions via withInfoPlist and withAndroidManifest, alongside monorepo package and documentation updates for Expo integration.

Sequence diagram for Expo plugin configuration process

sequenceDiagram
  participant Dev as actor Developer
  participant Expo as "Expo CLI"
  participant Plugin as "Config Plugin (withReactNativeGoogleAuth)"
  participant Native as "Native Project (iOS/Android)"
  Dev->>Expo: Run build (eas build, etc.)
  Expo->>Plugin: Load config plugin with options
  Plugin->>Native: Copy Google config files
  Plugin->>Native: Inject client IDs and permissions
  Native->>Plugin: Confirm configuration
  Plugin->>Expo: Return configured project
Loading

Class diagram for Expo config plugin types and main entry point

classDiagram
  class GoogleAuthPluginOptions {
    iosClientId: string
    androidClientId: string
    googleServicesFile: string
    iosGoogleServicesFile: string
  }
  class withGoogleAuth {
    +ConfigPlugin<GoogleAuthPluginOptions>
    +copyFileWithErrorHandling()
    +getIosClientIdFromPlist()
    +getAndroidClientIdFromJson()
  }
  class withReactNativeGoogleAuth {
    +ConfigPlugin<GoogleAuthPluginOptions>
  }
  withReactNativeGoogleAuth --> withGoogleAuth : uses
  withGoogleAuth ..> GoogleAuthPluginOptions : options
Loading

File-Level Changes

Change Details Files
Add Expo Config Plugin package scaffolding
  • Create new plugin package with its own package.json and tsconfig.json
  • Add plugin entrypoint in plugin/src/index.ts using withPlugins to apply config steps
plugin/package.json
plugin/tsconfig.json
plugin/src/index.ts
Implement Config Plugin logic for native platforms
  • Copy GoogleService-Info.plist and google-services.json into iOS and Android projects
  • Extract client IDs from plist/JSON and insert into Info.plist (GIDClientID, URL schemes)
  • Modify AndroidManifest to add INTERNET permission and prepare for Google Auth
plugin/src/withGoogleAuth.ts
Update monorepo package configuration and documentation
  • Register plugin in root package.json (plugin field, workspaces)
  • Revise README.md to document Expo Config Plugin and update Quick Start/Platform Setup sections
package.json
README.md

Possibly linked issues

  • #53: The PR introduces an Expo config plugin, which directly resolves the issue's reported build error caused by the absence of such a plugin for react-native-google-auth.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Comment thread plugin/src/withGoogleAuth.ts Outdated
Comment thread plugin/src/withGoogleAuth.ts Outdated
Comment thread plugin/src/withGoogleAuth.ts
Comment thread plugin/src/withGoogleAuth.ts Outdated
Comment thread plugin/src/withGoogleAuth.ts Outdated
Comment thread plugin/src/withGoogleAuth.ts
Comment thread plugin/src/withGoogleAuth.ts Outdated
Comment thread plugin/src/withGoogleAuth.ts
Comment thread plugin/src/withGoogleAuth.ts
Comment thread plugin/src/withGoogleAuth.ts
- Automatic Info.plist setup for iOS
- AndroidManifest.xml configuration
- Google service files integration
- Client ID validation
- URL scheme handling
@sbaiahmed1 sbaiahmed1 merged commit bfa00f3 into main Sep 21, 2025
4 of 6 checks passed
@sbaiahmed1 sbaiahmed1 deleted the feat/expo-plugin-dev branch September 21, 2025 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package "react-native-google-auth" does not contain a valid config plugin

1 participant