Google Auth Setup Instructions on Marionette
Step 1: Google Cloud Console Setup
Go to Google Cloud Console.
Create a project if you don’t already have one.
In the search bar (top center), type “Credentials” and select Credentials under “Products & Pages”.
Click the Create Credentials button.
Select OAuth Client ID from the pop-up window.
Choose the appropriate Application Type (iOS, Web, or Android).
We will now proceed with platform-specific setup instructions.
Step 2: iOS Setup
Select iOS under the Application Type dropdown.
Enter a name (e.g., “iOS OAuth”) and your app’s Bundle ID (found in
ios/Runner/Info.plist
under theCFBundleIdentifier
tag).Click the Create button.
Add to Info.plist:
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.***YOUR_CLIENT_ID***</string>
</array>
</dict>
</array>
Replace
YOUR_CLIENT_ID
with the generated Client ID.
Step 3: Web Setup
Select Web application under the Application Type dropdown.
Enter a name (e.g., “Web OAuth”).
Add Authorized JavaScript origins and Authorized redirect URIs:
Use
http://localhost
for local debugging.Use
https://yourdomain.com
for production.
Click Create to generate your Client ID.
Step 4: Android Setup
Select Android under the Application Type dropdown.
Enter a name (e.g., “Android OAuth Debug” for debugging and “Android OAuth Release” for production).
Obtain SHA-1 Keys:
Navigate to the
android
folder in your project:cd android
Run the following command to generate SHA-1 keys:
./gradlew signInReport
Use the appropriate SHA-1 key for both debug and release configurations.
Update build.gradle:
In
android/build.gradle
, add:In
android/app/build.gradle
, add:
Configure Signing Configurations:
Save the
key.jks
file inside theandroid/app/
directory of your Flutter project.Update
android/app/build.gradle
to include signing configurations: