Skip to content

Commit

Permalink
Adding updates to auth
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Apr 24, 2024
1 parent c755c52 commit 1641917
Show file tree
Hide file tree
Showing 12 changed files with 6,776 additions and 24 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,26 @@ You may also want to publish the auth config by running the following:
php artisan vendor:publish --tag=auth:config
```

## Adding the HasSocialProviders Trait.

You can add all the social auth helpers to your user model by including the following Trait:

```php
<?php

namespace App\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;
use Devdojo\Auth\Traits\HasSocialProviders; // Import the trait

class User extends Authenticatable
{
use HasSocialProviders; // Use the trait in the User model

// Existing User model code...
}
```

## License

The Laravel framework is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,10 @@
"livewire/livewire": "^3.0",
"livewire/volt": "^1.0",
"codeat3/blade-phosphor-icons": "^2.0",
"winter/laravel-config-writer": "^1.0"
},
"require-dev": {
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.0"
"winter/laravel-config-writer": "^1.0",
"laravel/socialite": "^5.0"
},
"require-dev": {},
"autoload": {
"psr-4": {
"Devdojo\\Auth\\": "src"
Expand Down
Loading

0 comments on commit 1641917

Please sign in to comment.