Skip to content

Commit

Permalink
fix: fix logic in the providers file
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndresRamirez committed Nov 3, 2024
1 parent 0345a56 commit a504371
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
7 changes: 4 additions & 3 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Providers;

use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
Expand All @@ -18,10 +19,10 @@ public function register(): void
* Bootstrap any application services.
*/
public function boot(): void

{
if($this->app->environment('production')) {
\URL::forceScheme('https');
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
}
}
10 changes: 7 additions & 3 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@
'github' => [
'client_id' => env('GITHUB_CLIENT_ID'),
'client_secret' => env('GITHUB_CLIENT_SECRET'),
'redirect' => env('GITHUB_REDIRECT_URL'),
'redirect' => env('APP_ENV') === 'production'
? 'https://gananza.crudzaso.com/auth/callback/github'
: 'http://127.0.0.1:8000/auth/callback/github',
],

'google' => [
'client_id' => env('GOOGLE_CLIENT_ID'),
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
'redirect' => env('GOOGLE_REDIRECT_URI'),
'scope' => ['email', 'profile'], // Agregar scopes aquí
'redirect' => env('APP_ENV') === 'production'
? 'https://gananza.crudzaso.com/auth/google/callback'
: 'http://127.0.0.1:8000/auth/google/callback',
'scope' => ['email', 'profile'],
],


Expand Down

0 comments on commit a504371

Please sign in to comment.