Skip to content

Conversation

@phpfour
Copy link
Contributor

@phpfour phpfour commented Dec 10, 2025

This adds support for Google Auth. Also slightly improves the login and signup page forms.

FYI @tareq1988

CleanShot 2025-12-10 at 08 08 54@2x

Summary by CodeRabbit

  • New Features

    • Added Google Sign-In and Sign-Up options on authentication pages
    • User profiles now support avatars from Google accounts
    • Existing accounts can be linked with Google profiles
  • Documentation

    • Added developer documentation for project conventions and architecture

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Walkthrough

This pull request integrates Google OAuth authentication into the application. It adds configuration for Google credentials, a new social login controller to handle OAuth flow, database schema updates to store google_id and avatar_url, controller modifications to expose OAuth status, frontend login and registration page updates, routing changes, a new dependency (Laravel Socialite), and developer documentation for Claude Code.

Changes

Cohort / File(s) Summary
Configuration & Dependencies
.env.example, composer.json, config/services.php, config/ziggy.php
Added Google OAuth environment variables; introduced laravel/socialite dependency; configured Google service credentials (client_id, client_secret, redirect URI); registered new auth routes in Ziggy configuration.
Database Schema
database/migrations/2025_12_10_004748_add_google_oauth_columns_to_users_table.php
Migration adds google_id (unique, nullable string) and avatar_url (nullable string) columns to users table; makes password column nullable to support passwordless OAuth signup.
User Model
app/Models/User.php
Added google_id and avatar_url to fillable attributes; hid google_id from serialization; enhanced avatar getter to prioritize avatar_url over Gravatar generation.
Authentication Controllers
app/Http/Controllers/Auth/AuthenticatedSessionController.php, app/Http/Controllers/Auth/RegisteredUserController.php
Added googleAuthEnabled flag to login and registration views via private helper method isGoogleAuthEnabled() that checks Google configuration presence.
Social Login Controller
app/Http/Controllers/Auth/SocialLoginController.php
New controller implementing OAuth flow: redirectToGoogle() initiates Socialite redirect; handleGoogleCallback() handles callback, performs user lookup by google_id or email, links accounts, creates new users with verified emails, and logs in authenticated users.
Frontend Auth Pages
resources/js/Pages/Auth/Login.tsx, resources/js/Pages/Auth/Register.tsx
Both pages accept googleAuthEnabled prop; conditionally render Google sign-in/up sections when enabled; refactored button layout and styling; replaced PrimaryButton with full-width Button components.
Frontend Component
resources/js/Components/GoogleIcon.tsx
New React TSX component rendering Google logo as inline SVG with customizable className prop.
Routing
routes/auth.php
Added two new guest-protected routes: GET /auth/googleredirectToGoogle(), GET /auth/google/callbackhandleGoogleCallback().
Developer Documentation
CLAUDE.md
New file documenting project context (stack: Laravel 10, Inertia.js, React 18, Tailwind), development commands, architectural details, code conventions for PHP/Laravel and React/TypeScript, and TailReact UI component patterns.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • SocialLoginController.php requires careful review of OAuth flow logic, error handling, user linking strategy, and event dispatching patterns.
  • User model avatar getter logic change should be verified for Gravatar fallback edge cases.
  • Database migration nullable password column change warrants confirmation of intended signup flow implications.
  • Frontend component integration across Login and Register pages should verify proper prop threading and conditional rendering correctness.

Poem

🐰 A rabbit with code, hops and cheers,
Google OAuth now appears!
Social logins, green icons so bright,
Authentication done right. 🎉
Thump thump—deployment takes flight!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add support for Google Auth' accurately summarizes the main change: implementing Google OAuth authentication throughout the application.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
app/Http/Controllers/Auth/AuthenticatedSessionController.php (1)

1-3: Missing declare(strict_types=1); statement.

Per coding guidelines, all PHP files must start with declare(strict_types=1);.

 <?php
+
+declare(strict_types=1);
 
 namespace App\Http\Controllers\Auth;
app/Http/Controllers/Auth/RegisteredUserController.php (1)

1-3: Missing declare(strict_types=1); statement.

Per coding guidelines, all PHP files must start with declare(strict_types=1);.

 <?php
+
+declare(strict_types=1);
 
 namespace App\Http\Controllers\Auth;
♻️ Duplicate comments (1)
app/Http/Controllers/Auth/RegisteredUserController.php (1)

29-36: Duplicate method already flagged.

This is the duplicate of isGoogleAuthEnabled() mentioned in AuthenticatedSessionController.php. Extract to a shared trait or service as suggested there.

🧹 Nitpick comments (5)
.env.example (1)

61-67: Google OAuth envs line up with config; consider fixing minor lint warning

The GOOGLE_* vars and OPENAI_MODEL entries match the usage in config/services.php, and the default callback URL is consistent with the route. You may also want to add a trailing newline to satisfy dotenv linters, but that's optional.

resources/js/Components/GoogleIcon.tsx (1)

1-21: Component is fine; consider accessibility attributes on the SVG

The component and typing look good. Since this icon is likely decorative inside a button, consider marking the SVG as hidden from assistive tech:

-    <svg className={className} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
+    <svg
+      className={className}
+      viewBox="0 0 24 24"
+      xmlns="http://www.w3.org/2000/svg"
+      aria-hidden="true"
+      focusable="false"
+    >
database/migrations/2025_12_10_004748_add_google_oauth_columns_to_users_table.php (1)

1-32: Migration matches model needs; be aware of rollback constraints

The new columns and nullable password change align with the OAuth flow and User model. Note that if you ever roll this migration back after creating users with password = null, the nullable(false)->change() in down() may fail until those rows are cleaned up or given a password. Otherwise, this looks solid.

app/Http/Controllers/Auth/AuthenticatedSessionController.php (1)

29-36: Duplicate method: extract to a shared trait or service.

The isGoogleAuthEnabled() method is identical in both AuthenticatedSessionController and RegisteredUserController (see app/Http/Controllers/Auth/RegisteredUserController.php, lines 31-35). Consider extracting this to a trait (e.g., ChecksGoogleAuth) or a dedicated service class to avoid duplication.

Example trait:

// app/Http/Controllers/Auth/Traits/ChecksGoogleAuth.php
trait ChecksGoogleAuth
{
    private function isGoogleAuthEnabled(): bool
    {
        return !empty(config('services.google.client_id'))
            && !empty(config('services.google.client_secret'));
    }
}
app/Http/Controllers/Auth/SocialLoginController.php (1)

29-33: Consider catching a more specific exception.

Catching the generic \Exception works but is broad. Socialite typically throws \Laravel\Socialite\Two\InvalidStateException for CSRF/state mismatches and \GuzzleHttp\Exception\ClientException for API errors. Consider catching these specifically for better error handling and logging.

-        } catch (\Exception $e) {
+        } catch (\Laravel\Socialite\Two\InvalidStateException $e) {
+            return redirect()->route('login')->with('error', 'Authentication session expired. Please try again.');
+        } catch (\Exception $e) {
+            report($e); // Log unexpected errors
             return redirect()->route('login')->with('error', 'Unable to authenticate with Google. Please try again.');
         }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a659819 and c82aa94.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (14)
  • .env.example (1 hunks)
  • CLAUDE.md (1 hunks)
  • app/Http/Controllers/Auth/AuthenticatedSessionController.php (1 hunks)
  • app/Http/Controllers/Auth/RegisteredUserController.php (1 hunks)
  • app/Http/Controllers/Auth/SocialLoginController.php (1 hunks)
  • app/Models/User.php (3 hunks)
  • composer.json (1 hunks)
  • config/services.php (1 hunks)
  • config/ziggy.php (1 hunks)
  • database/migrations/2025_12_10_004748_add_google_oauth_columns_to_users_table.php (1 hunks)
  • resources/js/Components/GoogleIcon.tsx (1 hunks)
  • resources/js/Pages/Auth/Login.tsx (3 hunks)
  • resources/js/Pages/Auth/Register.tsx (2 hunks)
  • routes/auth.php (2 hunks)
🧰 Additional context used
📓 Path-based instructions (8)
**/*.php

📄 CodeRabbit inference engine (.cursor/rules/laravel-conventions.mdc)

**/*.php: PHP 8.3+ required. Use latest language features: typed properties, enums, readonly classes.
Always start files with declare(strict_types=1);.
Follow PSR-12 code style.

**/*.php: Always start files with declare(strict_types=1);.
PHP 8.3+ features must be leveraged (readonly, typed properties, enums, etc.).
Follow PSR-12 strictly.
Avoid magic methods (__get, __set, __call) unless absolutely necessary.
All methods, functions, and properties must be fully typed.
Use void or never return types where appropriate.
Always prefer explicit type declarations over inferred types.
Use dependency injection rather than static access (new Something() inside methods is discouraged).
Use named constructors for complex object creation.
Use docblocks only for revealing array contents (@var list<string>), describing complex structures (generics, traversables), or explaining why something is done.
Use fully qualified class names in docblocks.
Prefer string interpolation with {} braces over concatenation.
Use sprintf when formatting multiple variables.
Always throw typed, domain-specific exceptions.
Avoid generic Exception wherever possible.
Typecast using native casting, not functions (e.g., $id = (int) $id;).
Prefer isset() and array_key_exists() checks for large arrays.
Always use PHP 8.1+ native enum for fixed value sets.
Use PascalCase for enum cases.
Prioritize regex readability and performance.
Use named capture groups and reuse patterns properly in regular expressions.
Always validate and sanitize external input.
Prevent SQL injection by whitelisting columns.
Escape or purify user-supplied HTML before rendering.

Files:

  • app/Models/User.php
  • app/Http/Controllers/Auth/RegisteredUserController.php
  • app/Http/Controllers/Auth/AuthenticatedSessionController.php
  • app/Http/Controllers/Auth/SocialLoginController.php
  • routes/auth.php
  • config/services.php
  • database/migrations/2025_12_10_004748_add_google_oauth_columns_to_users_table.php
  • config/ziggy.php
app/Models/*.php

📄 CodeRabbit inference engine (.cursor/rules/laravel-conventions.mdc)

app/Models/*.php: Models must be named in singular form (e.g., User).
Use custom EloquentBuilder classes for models with 3+ scopes.
Use explicit fill/assign properties instead of mass assignment.
Always use $fillable and whitelist validated data for mass assignment.

Files:

  • app/Models/User.php
{app,config,routes}/**/*.php

📄 CodeRabbit inference engine (.cursor/rules/laravel-conventions.mdc)

Environment variables must only be accessed via config() calls inside application code.

Files:

  • app/Models/User.php
  • app/Http/Controllers/Auth/RegisteredUserController.php
  • app/Http/Controllers/Auth/AuthenticatedSessionController.php
  • app/Http/Controllers/Auth/SocialLoginController.php
  • routes/auth.php
  • config/services.php
  • config/ziggy.php
{app,routes,database}/**/*.php

📄 CodeRabbit inference engine (.cursor/rules/laravel-conventions.mdc)

{app,routes,database}/**/*.php: Always use Model::query() instead of direct static methods.
Eager load relations to avoid N+1 queries.
Avoid magic methods like whereName(), prefer explicit where().
Never allow dynamic column names from user input to prevent SQL Injection.
Cache heavy queries using Laravel Cache.
Use dispatch() helper, not static ::dispatch() or Bus Facade.
Use chunking for large datasets (e.g., chunk(100)).
Use eager loading and indexed columns for performance.

Files:

  • app/Models/User.php
  • app/Http/Controllers/Auth/RegisteredUserController.php
  • app/Http/Controllers/Auth/AuthenticatedSessionController.php
  • app/Http/Controllers/Auth/SocialLoginController.php
  • routes/auth.php
  • database/migrations/2025_12_10_004748_add_google_oauth_columns_to_users_table.php
resources/js/**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/tail-react-components.mdc)

resources/js/**/*.tsx: Always use TailReact components if an equivalent exists instead of building custom implementations.
Do not duplicate functionality that is already available in TailReact.
Maintain consistent styling by using the design system provided by TailReact.
Extend TailReact components via props or composition if needed — do not override styles manually unless necessary.
Always use provided TailReact component props correctly and completely to ensure type safety.
If a TailReact component is missing required behavior, extend it properly or suggest improvements rather than reimplementing.
Only build new components if absolutely necessary and after confirming TailReact doesn't offer it.
Prefer composition (wrapping existing components) over reimplementation when extending TailReact components.

Files:

  • resources/js/Components/GoogleIcon.tsx
  • resources/js/Pages/Auth/Login.tsx
  • resources/js/Pages/Auth/Register.tsx
routes/*.php

📄 CodeRabbit inference engine (.cursor/rules/laravel-conventions.mdc)

routes/*.php: Route parameters should use camelCase (e.g., {userId}).
Do not use Route::resource(). Define routes manually.
Prefer tuple notation for controller bindings in routes.
Always name routes.
Use kebab-case URLs and camelCase route parameters.

Files:

  • routes/auth.php
{composer.json,composer.lock}

📄 CodeRabbit inference engine (.cursor/rules/php-conventions.mdc)

Use Composer. Lock dependencies via composer.lock.

Files:

  • composer.json
composer.json

📄 CodeRabbit inference engine (.cursor/rules/php-conventions.mdc)

Keep composer.json normalized and audited.

Files:

  • composer.json
🧠 Learnings (8)
📓 Common learnings
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/php-conventions.mdc:0-0
Timestamp: 2025-08-06T18:17:04.908Z
Learning: Applies to **/*.php : Always prefer explicit type declarations over inferred types.
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/php-conventions.mdc:0-0
Timestamp: 2025-08-06T18:17:04.908Z
Learning: Applies to **/*.php : Prefer string interpolation with `{}` braces over concatenation.
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/php-conventions.mdc:0-0
Timestamp: 2025-08-06T18:17:04.908Z
Learning: Applies to **/*.php : Prefer `isset()` and `array_key_exists()` checks for large arrays.
📚 Learning: 2025-08-06T18:16:46.878Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/laravel-conventions.mdc:0-0
Timestamp: 2025-08-06T18:16:46.878Z
Learning: Applies to app/Models/*.php : Use explicit fill/assign properties instead of mass assignment.

Applied to files:

  • app/Models/User.php
📚 Learning: 2025-08-06T18:16:46.878Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/laravel-conventions.mdc:0-0
Timestamp: 2025-08-06T18:16:46.878Z
Learning: Applies to app/Models/*.php : Always use `$fillable` and whitelist validated data for mass assignment.

Applied to files:

  • app/Models/User.php
📚 Learning: 2025-08-06T18:17:15.032Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/tail-react-components.mdc:0-0
Timestamp: 2025-08-06T18:17:15.032Z
Learning: Applies to resources/js/**/*.tsx : Extend TailReact components via props or composition if needed — do not override styles manually unless necessary.

Applied to files:

  • resources/js/Components/GoogleIcon.tsx
📚 Learning: 2025-08-06T18:17:15.032Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/tail-react-components.mdc:0-0
Timestamp: 2025-08-06T18:17:15.032Z
Learning: Applies to resources/js/**/*.tsx : If a TailReact component is missing required behavior, extend it properly or suggest improvements rather than reimplementing.

Applied to files:

  • resources/js/Components/GoogleIcon.tsx
📚 Learning: 2025-08-06T18:17:15.032Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/tail-react-components.mdc:0-0
Timestamp: 2025-08-06T18:17:15.032Z
Learning: Applies to resources/js/**/*.tsx : Maintain consistent styling by using the design system provided by TailReact.

Applied to files:

  • resources/js/Components/GoogleIcon.tsx
📚 Learning: 2025-08-06T18:16:46.878Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/laravel-conventions.mdc:0-0
Timestamp: 2025-08-06T18:16:46.878Z
Learning: Applies to app/Http/Controllers/*Controller.php : Prefer invokable Single Action Controllers.

Applied to files:

  • routes/auth.php
📚 Learning: 2025-08-06T18:16:46.878Z
Learnt from: CR
Repo: weDevsOfficial/ideabox PR: 0
File: .cursor/rules/laravel-conventions.mdc:0-0
Timestamp: 2025-08-06T18:16:46.878Z
Learning: Applies to routes/*.php : Do not use `Route::resource()`. Define routes manually.

Applied to files:

  • routes/auth.php
🧬 Code graph analysis (5)
app/Http/Controllers/Auth/RegisteredUserController.php (1)
app/Http/Controllers/Auth/AuthenticatedSessionController.php (1)
  • isGoogleAuthEnabled (32-36)
app/Http/Controllers/Auth/AuthenticatedSessionController.php (1)
app/Http/Controllers/Auth/RegisteredUserController.php (1)
  • isGoogleAuthEnabled (32-36)
resources/js/Pages/Auth/Login.tsx (1)
resources/js/Components/GoogleIcon.tsx (1)
  • GoogleIcon (1-22)
routes/auth.php (1)
app/Http/Controllers/Auth/SocialLoginController.php (1)
  • SocialLoginController (14-82)
resources/js/Pages/Auth/Register.tsx (1)
resources/js/Components/GoogleIcon.tsx (1)
  • GoogleIcon (1-22)
🪛 dotenv-linter (4.0.0)
.env.example

[warning] 67-67: [EndingBlankLine] No blank line at the end of the file

(EndingBlankLine)

🔇 Additional comments (17)
composer.json (1)

7-18: Add Socialite dependency looks correct; ensure lockfile & audit are updated

The laravel/socialite requirement and package ordering look fine; just make sure composer.lock is updated and you run a dependency audit as part of this change.

CLAUDE.md (1)

1-81: Documentation is clear and aligns with project conventions

The guidance here matches the PHP/Laravel and React/TailReact conventions in the repo and will be useful for future automation. No changes needed.

config/services.php (1)

34-43: Google service configuration is consistent; verify redirect matches provider settings

The google block is wired correctly to env vars, and the default redirect path matches the callback route. Just ensure GOOGLE_REDIRECT_URI (or APP_URL + default path) exactly matches the URL configured in the Google Cloud console to avoid callback mismatch errors.

app/Models/User.php (2)

26-48: Google fields on User look reasonable; ensure mass-assignment remains constrained

Adding google_id and avatar_url to $fillable and hiding google_id from serialization is consistent with the new OAuth flow. Just make sure any mass-assignment paths only use validated data from Socialite/your own mapping logic so these fields can’t be spoofed by arbitrary request payloads.


84-96: Avatar accessor behavior change is sensible

Preferring avatar_url when present and falling back to Gravatar keeps existing behavior while enabling provider avatars. This looks good; no changes needed.

config/ziggy.php (1)

3-9: Ziggy route group update correctly exposes Google auth routes

Including auth.google and auth.google.callback in the auth group is consistent with the new OAuth endpoints and will make them available to the frontend via Ziggy. Looks good.

routes/auth.php (1)

38-43: LGTM! Google OAuth routes are correctly configured.

The routes are properly placed within the guest middleware group, use named routes, and follow the array notation pattern consistent with the existing routes in this file.

resources/js/Pages/Auth/Register.tsx (2)

10-14: Props type definition looks good.

The googleAuthEnabled prop is correctly typed as a boolean.


124-143: Google Sign Up UI implementation is correct.

Good implementation:

  • Correctly uses an anchor tag (<a>) instead of Inertia's <Link> for OAuth redirect, which requires a full page navigation.
  • Proper conditional rendering based on googleAuthEnabled.
  • Consistent dark mode styling.
app/Http/Controllers/Auth/SocialLoginController.php (4)

1-13: Well-structured controller with proper declarations.

Good adherence to coding guidelines: declare(strict_types=1) is present, proper namespacing, and explicit return types on methods.


44-46: "Remember me" is always enabled.

Auth::login($user, true) sets remember-me to true unconditionally. This may be intentional for OAuth flows, but consider whether users should have control over session persistence, especially on shared devices.


49-63: Verify the email-based account linking security model.

When a user with an existing email logs in via Google, their account is automatically linked. This is a common pattern but has security implications:

  1. If an attacker knows a user's email and can create a Google account with that email (unlikely but possible in some scenarios), they could gain access.
  2. The original user may not expect their account to be linked to Google without explicit consent.

Consider whether you want to prompt the user to confirm linking or require password verification for existing password-based accounts.


65-74: New user creation is correctly implemented.

  • Email is marked as verified (appropriate since Google verified it).
  • Uses User::query()->create() per guidelines.
  • Sets default role appropriately.
  • Fires Registered event for any listeners (e.g., welcome emails).
resources/js/Pages/Auth/Login.tsx (4)

4-4: Local GoogleIcon import keeps concerns nicely modular

Using a dedicated GoogleIcon component instead of inlining SVG here keeps the page lean and makes reuse straightforward. No issues from a typing or composition perspective.


80-100: Remember‑me row flex layout and link styling look good

Switching this row to flex items-center justify-between reads well and should behave better responsively. The simplified Tailwind classes on the “Forgot your password?” link are consistent with the rest of the palette and keep the focus/hover behavior intact.


102-104: Using TailReact Button for the primary CTA aligns with the design system

Replacing the old submit control with Button from @wedevs/tail-react keeps the form aligned with the shared design system. The component properly forwards type="submit", className="w-full mt-6", and disabled={processing} to the underlying button element, consistent with established usage patterns throughout the codebase.


107-126: Google auth block implementation is appropriate

The custom divider and Google sign-in button are well-structured with proper focus/hover states and semantic markup. TailReact (@wedevs/tail-react) does not provide divider or social login button components, so the current custom implementation is the correct approach here.

Comment on lines 11 to 19
export default function Login({
status,
canResetPassword,
googleAuthEnabled,
}: {
status?: string;
canResetPassword: boolean;
googleAuthEnabled: boolean;
}) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Find server-side code that renders the Login Inertia page
rg -n "Auth/Login" resources -S --type php --type blade
rg -n "Auth/Login" app -S --type php
rg -n "googleAuthEnabled" --type php --type blade -B 2 -A 2

Repository: weDevsOfficial/ideabox

Length of output: 253


🏁 Script executed:

#!/bin/bash
# Read the AuthenticatedSessionController to see what props are passed
cat -n app/Http/Controllers/Auth/AuthenticatedSessionController.php

Repository: weDevsOfficial/ideabox

Length of output: 1697


🏁 Script executed:

#!/bin/bash
# Search for all Inertia::render calls to Auth/Login
rg -n "Auth/Login" app -S

# Search for googleAuthEnabled in PHP code
rg -n "googleAuthEnabled" app -S

Repository: weDevsOfficial/ideabox

Length of output: 176


🏁 Script executed:

#!/bin/bash
# Read the Login component to see how googleAuthEnabled is used
cat -n resources/js/Pages/Auth/Login.tsx | head -80

Repository: weDevsOfficial/ideabox

Length of output: 2761


🏁 Script executed:

#!/bin/bash
# Search for googleAuthEnabled usage in the Login component
rg -n "googleAuthEnabled" resources/js/Pages/Auth/Login.tsx -A 3 -B 3

Repository: weDevsOfficial/ideabox

Length of output: 48


🏁 Script executed:

#!/bin/bash
# Get full context of the Login component around prop usage
cat -n resources/js/Pages/Auth/Login.tsx

Repository: weDevsOfficial/ideabox

Length of output: 3916


Server-side code does not provide googleAuthEnabled prop to match the updated component signature

The AuthenticatedSessionController.create() method (line 22-25) returns Inertia::render('Auth/Login', [...]) with only canResetPassword and status props. It does not provide googleAuthEnabled, which you've added as a required boolean in the component signature. Update the server-side render call to include googleAuthEnabled as a boolean value so the prop type matches at runtime.

🤖 Prompt for AI Agents
In resources/js/Pages/Auth/Login.tsx around lines 11-19 the component signature
requires a boolean googleAuthEnabled prop, but the server render call in
AuthenticatedSessionController.create() (around lines 22-25) does not supply it;
update that controller render to include googleAuthEnabled: <boolean> (e.g.,
from your config or feature-flag: config('services.google.enabled') or a
dedicated feature check) so the Inertia::render('Auth/Login', [...]) payload
contains googleAuthEnabled and matches the component signature at runtime.

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.

1 participant