Skip to content

Commit 635f87f

Browse files
committed
register route
1 parent af89853 commit 635f87f

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"require": {
1919
"php": "^8.0",
2020
"illuminate/contracts": "^8.37|^9.0",
21+
"illuminate/support": "^8.0|^9.0",
2122
"ikoncept/ikoncept-socialite-provider": "^1.0",
2223
"laravel/socialite": "^5.2",
2324
"spatie/laravel-package-tools": "^1.9.2"

src/IkonceptOauthServiceProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public function boot(): void
1111
$this->publishes([
1212
__DIR__.'/../config/ikoncept-oauth.php' => config_path('ikoncept-oauth.php'),
1313
], 'config');
14+
15+
IkonceptOauth::routes();
1416
}
1517

1618
public function register(): void

src/RouteRegistrar.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public function __construct(Router $router)
3232
*/
3333
public function all(): void
3434
{
35-
Route::get('login/ikoncept', [\Ikoncept\IkonceptOauth\Http\Controllers\AuthController::class, 'redirectToProvider']);
36-
Route::get('login/ikoncept/callback', [\Ikoncept\IkonceptOauth\Http\Controllers\AuthController::class, 'handleProviderCallback']);
35+
Route::get('login/ikoncept', [\Ikoncept\IkonceptOauth\Http\Controllers\AuthController::class, 'redirectToProvider'])
36+
->middleware(['web']);
37+
Route::get('login/ikoncept/callback', [\Ikoncept\IkonceptOauth\Http\Controllers\AuthController::class, 'handleProviderCallback'])
38+
->middleware(['web']);
3739
}
3840
}

0 commit comments

Comments
 (0)